@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@600;700&family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&family=Noto+Sans+Malayalam:wght@400;500;600;700&family=Noto+Serif+Malayalam:wght@600;700&family=Source+Sans+3:wght@400;500;600;700&display=swap');

:root,
html[data-theme='light'] {
  /* Brand green — restored previous footer forest green */
  --color-primary: #064e3b;
  --color-primary-rgb: 6, 78, 59;
  --color-primary-dark: #022c22;
  --color-primary-soft: rgba(6, 78, 59, 0.12);
  --color-accent: var(--color-primary);
  --color-accent-soft: var(--color-primary-soft);
  --color-surface: #ffffff;
  /* Continuous mint wash — atmosphere + clouds sit behind content */
  --color-page: #eef7f2;
  --color-muted: #e8f3ed;
  --color-border: rgba(6, 78, 59, 0.1);
  --color-text: #1a2e26;
  --color-text-muted: #5a6f66;
  --color-header-bg: rgba(255, 255, 255, 0.88);
  --color-hero-bg: #ffffff;
  --color-footer: var(--color-primary);
  /* Soft modern elevation — less heavy vintage shadow */
  --shadow-soft: 0 2px 8px rgba(var(--color-primary-rgb), 0.06), 0 8px 24px rgba(var(--color-primary-rgb), 0.1);
  --shadow-hover: 0 4px 12px rgba(var(--color-primary-rgb), 0.1), 0 14px 36px rgba(var(--color-primary-rgb), 0.16);
  --shadow-green: 0 2px 10px rgba(var(--color-primary-rgb), 0.07), 0 10px 28px rgba(var(--color-primary-rgb), 0.12);
  --radius: 14px;
  --radius-sm: 10px;
  --container: 1160px;
  --font-display: 'Cormorant Garamond', 'Noto Serif Malayalam', Georgia, serif;
  --font-body: 'Source Sans 3', 'Noto Sans Malayalam', system-ui, sans-serif;
  --transition: 0.25s ease;
  --header-h: 70px;
}

html[data-theme='dark'] {
  /* Same brand green in dark mode — no teal drift */
  --color-primary: #064e3b;
  --color-primary-rgb: 6, 78, 59;
  --color-primary-dark: #022c22;
  --color-primary-soft: rgba(6, 78, 59, 0.22);
  --color-accent: var(--color-primary);
  --color-accent-soft: var(--color-primary-soft);
  --color-surface: #111827;
  --color-page: #0c1612;
  --color-muted: #1f2937;
  --color-border: #334155;
  --color-text: #e5e7eb;
  --color-text-muted: #94a3b8;
  --color-header-bg: rgba(15, 23, 42, 0.94);
  --color-hero-bg: #0f172a;
  --color-footer: var(--color-primary);
  --shadow-soft: 0 6px 20px rgba(0, 0, 0, 0.32), 0 10px 36px rgba(var(--color-primary-rgb), 0.34);
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.38), 0 16px 48px rgba(var(--color-primary-rgb), 0.44);
  --shadow-green: 0 6px 22px rgba(0, 0, 0, 0.28), 0 14px 46px rgba(var(--color-primary-rgb), 0.4);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background:
    linear-gradient(
      180deg,
      #f4fbf7 0%,
      var(--color-page) 28%,
      #eaf6f0 62%,
      var(--color-page) 100%
    );
  line-height: 1.65;
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: clip;
}

/* Continuous green/white atmospheric wash — behind all content. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 45% at 8% 18%, rgba(255, 255, 255, 0.75) 0%, transparent 62%),
    radial-gradient(ellipse 55% 40% at 92% 28%, rgba(209, 250, 229, 0.55) 0%, transparent 65%),
    radial-gradient(ellipse 60% 35% at 70% 72%, rgba(255, 255, 255, 0.5) 0%, transparent 68%),
    radial-gradient(ellipse 50% 40% at 18% 78%, rgba(167, 243, 208, 0.28) 0%, transparent 70%),
    radial-gradient(
      ellipse 100% 90% at 50% 40%,
      transparent 0%,
      transparent 42%,
      rgba(var(--color-primary-rgb), 0.04) 68%,
      rgba(var(--color-primary-rgb), 0.1) 100%
    );
}

/* Soft drifting green/white cloud banks — seamless loop via bg-position. */
body::after {
  content: '';
  position: fixed;
  inset: -12% -8%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.85;
  background-image:
    radial-gradient(ellipse 24% 20% at 10% 28%, rgba(255, 255, 255, 0.95) 0%, transparent 68%),
    radial-gradient(ellipse 20% 18% at 26% 58%, rgba(220, 252, 231, 0.82) 0%, transparent 70%),
    radial-gradient(ellipse 28% 22% at 48% 18%, rgba(255, 255, 255, 0.78) 0%, transparent 66%),
    radial-gradient(ellipse 22% 19% at 66% 64%, rgba(167, 243, 208, 0.58) 0%, transparent 68%),
    radial-gradient(ellipse 30% 21% at 88% 36%, rgba(255, 255, 255, 0.88) 0%, transparent 70%),
    radial-gradient(ellipse 18% 16% at 6% 82%, rgba(209, 250, 229, 0.62) 0%, transparent 68%),
    radial-gradient(ellipse 16% 14% at 42% 88%, rgba(255, 255, 255, 0.7) 0%, transparent 70%),
    radial-gradient(ellipse 24% 20% at 110% 28%, rgba(255, 255, 255, 0.95) 0%, transparent 68%),
    radial-gradient(ellipse 20% 18% at 126% 58%, rgba(220, 252, 231, 0.82) 0%, transparent 70%),
    radial-gradient(ellipse 28% 22% at 148% 18%, rgba(255, 255, 255, 0.78) 0%, transparent 66%),
    radial-gradient(ellipse 22% 19% at 166% 64%, rgba(167, 243, 208, 0.58) 0%, transparent 68%),
    radial-gradient(ellipse 30% 21% at 188% 36%, rgba(255, 255, 255, 0.88) 0%, transparent 70%),
    radial-gradient(ellipse 18% 16% at 106% 82%, rgba(209, 250, 229, 0.62) 0%, transparent 68%),
    radial-gradient(ellipse 16% 14% at 142% 88%, rgba(255, 255, 255, 0.7) 0%, transparent 70%);
  background-size: 200% 100%;
  background-repeat: no-repeat;
  background-position: 0% 0%;
  filter: blur(22px);
  animation: site-cloud-drift 88s linear infinite;
  will-change: background-position;
}

@keyframes site-cloud-drift {
  from { background-position: 0% 0%; }
  to { background-position: -100% 0%; }
}

/* Hero sits above fixed atmosphere (main z-index > body ::before/::after).
   Do NOT mask page clouds to viewport — that blanks mid-page after scroll. */
html[data-theme='dark'] body {
  background:
    linear-gradient(
      180deg,
      #0a1410 0%,
      var(--color-page) 30%,
      #0c1612 100%
  );
}

html[data-theme='dark'] body::before {
  background:
    radial-gradient(ellipse 70% 45% at 8% 18%, rgba(236, 253, 245, 0.08) 0%, transparent 62%),
    radial-gradient(ellipse 55% 40% at 92% 28%, rgba(6, 78, 59, 0.35) 0%, transparent 65%),
    radial-gradient(ellipse 60% 35% at 70% 72%, rgba(236, 253, 245, 0.06) 0%, transparent 68%),
    radial-gradient(
      ellipse 100% 90% at 50% 40%,
      transparent 0%,
      transparent 40%,
      rgba(var(--color-primary-rgb), 0.14) 68%,
      rgba(var(--color-primary-rgb), 0.28) 100%
    );
}

html[data-theme='dark'] body::after {
  opacity: 0.35;
  filter: blur(32px);
}

body:has(.admin-shell)::before,
body:has(.admin-shell)::after {
  content: none;
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  body::after {
    animation-duration: 180s;
  }
}

/* Homepage site-wide green/white cloud banks (behind main; hero covers dome).
   Same seamless 200% / -50% marquee as hero tracks. */
.site-clouds {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.site-cloud-track {
  position: absolute;
  left: 0;
  display: flex;
  width: 200%;
  height: 38%;
  will-change: transform;
  animation: hero-cloud-marquee linear infinite;
}

@keyframes hero-cloud-marquee {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}

.site-cloud-tile {
  flex: 0 0 50%;
  width: 50%;
  height: 100%;
  display: block;
  filter: blur(20px);
  opacity: 0.9;
  background:
    radial-gradient(ellipse 18% 55% at 8% 50%, rgba(255, 255, 255, 0.95) 0%, transparent 70%),
    radial-gradient(ellipse 22% 60% at 28% 42%, rgba(220, 252, 231, 0.85) 0%, transparent 72%),
    radial-gradient(ellipse 20% 58% at 48% 58%, rgba(255, 255, 255, 0.8) 0%, transparent 70%),
    radial-gradient(ellipse 24% 62% at 70% 45%, rgba(167, 243, 208, 0.55) 0%, transparent 72%),
    radial-gradient(ellipse 18% 54% at 90% 55%, rgba(255, 255, 255, 0.88) 0%, transparent 70%);
}

.site-cloud-track-a {
  top: 8%;
  height: 32%;
  animation-duration: 78s;
  opacity: 0.7;
}

.site-cloud-track-b {
  top: 38%;
  height: 36%;
  animation-duration: 104s;
  animation-delay: -30s;
  opacity: 0.85;
}

.site-cloud-track-b .site-cloud-tile {
  filter: blur(26px);
  background:
    radial-gradient(ellipse 20% 58% at 12% 48%, rgba(236, 253, 245, 0.9) 0%, transparent 70%),
    radial-gradient(ellipse 26% 64% at 40% 55%, rgba(255, 255, 255, 0.78) 0%, transparent 72%),
    radial-gradient(ellipse 22% 60% at 68% 40%, rgba(167, 243, 208, 0.5) 0%, transparent 70%),
    radial-gradient(ellipse 20% 56% at 92% 58%, rgba(255, 255, 255, 0.82) 0%, transparent 72%);
}

.site-cloud-track-c {
  top: 62%;
  height: 40%;
  animation-duration: 92s;
  animation-delay: -48s;
  animation-direction: reverse;
  opacity: 0.75;
}

.site-cloud-track-c .site-cloud-tile {
  filter: blur(24px);
  background:
    radial-gradient(ellipse 22% 60% at 16% 52%, rgba(255, 255, 255, 0.85) 0%, transparent 70%),
    radial-gradient(ellipse 28% 66% at 46% 42%, rgba(209, 250, 229, 0.7) 0%, transparent 72%),
    radial-gradient(ellipse 24% 58% at 78% 58%, rgba(255, 255, 255, 0.75) 0%, transparent 70%);
}

@media (prefers-reduced-motion: reduce) {
  .site-cloud-track-a { animation-duration: 150s; }
  .site-cloud-track-b { animation-duration: 180s; }
  .site-cloud-track-c { animation-duration: 160s; }
}

html[data-theme='dark'] .site-cloud-tile {
  opacity: 0.4;
}

/* Keep stacking above body::before/::after; do NOT put .site-header here —
   sticky header needs its own position: sticky rule below. */
#site-header,
main,
.site-footer {
  position: relative;
  z-index: 1;
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-primary-dark);
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text);
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.35rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

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

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 8px 20px rgba(var(--color-primary-rgb), 0.22);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  border-color: var(--color-border);
  color: var(--color-text);
}

.btn-ghost:hover {
  border-color: var(--color-accent);
  color: var(--color-primary);
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
}

/* ——— Header ——— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--color-header-bg);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(var(--color-primary-rgb), 0.06);
  overflow: visible;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: var(--header-h);
  position: relative;
  overflow: visible;
  max-width: 100%;
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  align-self: center;
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1;
  color: var(--color-primary);
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: -0.01em;
}

.brand .brand-tld {
  line-height: 1;
}

/* Shared size for search + theme toggles */
.header-actions .icon-btn,
.header-actions .icon-btn.header-icon-btn,
.header-actions .icon-btn.header-search-toggle,
.header-actions .icon-btn#theme-toggle,
.header-actions .icon-btn.mobile-toggle {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  margin: 0;
  flex-shrink: 0;
  line-height: 1;
}

.icon-btn.header-icon-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  margin: 0;
  flex-shrink: 0;
  line-height: 1;
}

.icon-btn.header-icon-btn svg {
  width: 18px;
  height: 18px;
}

.header-icon-btn.header-search-toggle:hover,
.header-icon-btn.header-search-toggle:focus-visible,
.header-icon-btn.header-search-toggle[aria-expanded='true'],
.header-icon-btn#theme-toggle:hover,
.header-icon-btn#theme-toggle:focus-visible {
  border-color: var(--color-primary);
  color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.18);
}

/* Header search: icon only; popover out of flow */
.header-search-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  height: 36px;
}

/* Beat .search-live { position: relative } so popover never sits in the header row */
.header-search-wrap .header-search.search-live,
.header-search-wrap .header-search {
  display: none;
  align-items: center;
  gap: 0.45rem;
  position: absolute;
  top: calc(100% + 0.45rem);
  inset-inline-end: 0;
  inset-inline-start: auto;
  width: min(340px, calc(100% - 1.5rem));
  max-width: min(340px, calc(100vw - 2rem));
  margin: 0;
  z-index: 1100;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 0.5rem 0.85rem;
  box-shadow: var(--shadow-soft);
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.header-search-wrap .header-search.is-open {
  display: flex;
}

.header-search-wrap .header-search[hidden] {
  display: none !important;
}

.header-search-wrap .header-search[hidden] {
  display: none !important;
}

.header-search:hover,
.header-search:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.18),
    0 6px 18px rgba(var(--color-primary-rgb), 0.12);
}

.header-search input {
  width: 100%;
  border: 0;
  background: transparent;
  font: inherit;
  color: var(--color-text);
  outline: none;
}

.header-search-icon {
  color: var(--color-text-muted);
  display: grid;
  flex-shrink: 0;
}

.header-search:hover .header-search-icon,
.header-search:focus-within .header-search-icon {
  color: var(--color-primary);
}

html[data-theme='dark'] .header-search {
  background: var(--color-muted);
}

html[data-theme='dark'] .header-search:hover,
html[data-theme='dark'] .header-search:focus-within {
  background: var(--color-surface);
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.28),
    0 8px 22px rgba(0, 0, 0, 0.35);
}

/* Header search: toggle only until opened */
.header-search-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.icon-btn.header-search-toggle svg {
  width: 18px;
  height: 18px;
}

.icon-btn.header-search-toggle:hover,
.icon-btn.header-search-toggle:focus-visible,
.icon-btn.header-search-toggle[aria-expanded='true'] {
  border-color: var(--color-primary);
  color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.18);
}

.header-search {
  display: none;
  align-items: center;
  gap: 0.45rem;
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  width: min(340px, calc(100vw - 1.5rem));
  z-index: 1100;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 0.5rem 0.85rem;
  box-shadow: var(--shadow-soft);
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.header-search.is-open {
  display: flex;
}

.header-search:hover,
.header-search:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.18),
    0 6px 18px rgba(var(--color-primary-rgb), 0.12);
}

.header-search input {
  width: 100%;
  border: 0;
  background: transparent;
  font: inherit;
  color: var(--color-text);
  outline: none;
}

.header-search-icon {
  color: var(--color-text-muted);
  display: grid;
  flex-shrink: 0;
}

.header-search:hover .header-search-icon,
.header-search:focus-within .header-search-icon {
  color: var(--color-primary);
}

html[data-theme='dark'] .header-search {
  background: var(--color-muted);
}

html[data-theme='dark'] .header-search:hover,
html[data-theme='dark'] .header-search:focus-within {
  background: var(--color-surface);
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.28),
    0 8px 22px rgba(0, 0, 0, 0.35);
}

/* Live search results panel */
.search-live {
  position: relative;
}

.search-live-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.4rem);
  z-index: 1200;
  max-height: min(70vh, 420px);
  overflow: auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft);
  padding: 0.4rem;
}

.search-live-panel[hidden] {
  display: none !important;
}

.search-live-group + .search-live-group {
  margin-top: 0.35rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--color-border);
}

.search-live-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding: 0.35rem 0.65rem 0.2rem;
}

.search-live-item {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  color: var(--color-text);
}

.search-live-item:hover,
.search-live-item:focus-visible {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.search-live-title {
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.35;
}

.search-live-meta {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.search-live-status {
  padding: 0.85rem 0.75rem;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

/* Homepage search */
.home-search-section {
  padding-top: 0;
  padding-bottom: 1.5rem;
  margin-top: -1rem;
}

.home-search {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  max-width: 640px;
  margin: 0 auto;
  position: relative;
  z-index: 20;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 0.35rem 0.4rem 0.35rem 1rem;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.home-search-btn {
  flex-shrink: 0;
  border-radius: 999px;
  padding: 0.75rem 1.35rem;
  font-size: 0.95rem;
  box-shadow: none;
}

.home-search:hover,
.home-search:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(var(--color-primary-rgb), 0.16),
    0 10px 28px rgba(var(--color-primary-rgb), 0.14);
}

.home-search-icon {
  color: var(--color-text-muted);
  display: grid;
  flex-shrink: 0;
}

.home-search:hover .home-search-icon,
.home-search:focus-within .home-search-icon {
  color: var(--color-primary);
}

.home-search input {
  width: 100%;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 1.02rem;
  color: var(--color-text);
  outline: none;
}

html[data-theme='dark'] .home-search {
  background: var(--color-muted);
}

html[data-theme='dark'] .home-search:hover,
html[data-theme='dark'] .home-search:focus-within {
  background: var(--color-surface);
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.28),
    0 8px 22px rgba(0, 0, 0, 0.35);
}

.nav-desktop {
  display: none;
}

.nav-item {
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  height: 100%;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  height: 36px;
  padding: 0 0.7rem;
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.875rem;
  line-height: 1;
  white-space: nowrap;
  border-radius: 999px;
  transition: background var(--transition), color var(--transition);
}

.nav-caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid currentColor;
  opacity: 0.55;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-item.has-dropdown:hover .nav-caret,
.nav-item.has-dropdown:focus-within .nav-caret,
.nav-item.has-dropdown.is-open .nav-caret {
  opacity: 1;
  transform: rotate(180deg);
}

.nav-link:hover,
.nav-item:focus-within > .nav-link,
.nav-item:hover > .nav-link,
.nav-item.is-open > .nav-link {
  background: var(--color-accent-soft);
  color: var(--color-primary);
}

.dropdown {
  position: absolute;
  /* Overlap trigger slightly so pointer never crosses a dead gap */
  top: calc(100% - 4px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 220px;
  max-width: min(280px, calc(100vw - 2rem));
  /* overflow must stay visible — auto clips the ::before hover bridge */
  overflow: visible;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
  /* Top padding is an in-box hover bridge (works even if ::before is ignored) */
  padding: 0.7rem 0.45rem 0.45rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, visibility 0.15s ease;
  z-index: 1200;
}

/* Extra hover bridge above the panel (requires overflow:visible on .dropdown) */
.dropdown::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -14px;
  height: 18px;
}

.dropdown-arrow {
  position: absolute;
  top: 4px;
  left: 50%;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-left: 1px solid var(--color-border);
  transform: rotate(45deg);
  pointer-events: none;
}

.nav-item:hover .dropdown,
.nav-item:focus-within .dropdown,
.nav-item.is-open .dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%);
}

.nav-item.has-dropdown > .nav-link {
  cursor: pointer;
}

.dropdown-overview {
  display: block;
  padding: 0.55rem 0.75rem;
  margin-bottom: 0.25rem;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-primary);
  background: var(--color-primary-soft);
}

.dropdown-list {
  display: grid;
  gap: 0.1rem;
  max-height: min(65vh, 400px);
  overflow: auto;
}

.dropdown a,
.dropdown-list a {
  display: block;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  color: var(--color-text);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.35;
  white-space: normal;
}

.dropdown a:hover,
.dropdown-list a:hover {
  background: var(--color-muted);
  color: var(--color-primary);
}

.dropdown a.dropdown-overview:hover {
  background: rgba(var(--color-primary-rgb), 0.18);
  color: var(--color-primary-dark);
}

html[data-theme='dark'] .dropdown {
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.header-actions {
  display: flex;
  align-items: center;
  align-self: center;
  gap: 0.45rem;
  margin-left: auto;
  flex-shrink: 0;
  min-width: 0;
  z-index: 2;
  height: 36px;
}

.header-lang {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.locale-trigger {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  height: 36px;
  min-width: 3.4rem;
  padding: 0 0.65rem;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.locale-trigger:hover,
.header-lang.is-open .locale-trigger {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.locale-trigger:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.locale-trigger-caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid currentColor;
  opacity: 0.65;
  transition: transform 0.15s ease;
}

.header-lang.is-open .locale-trigger-caret {
  transform: rotate(180deg);
}

.locale-menu {
  position: absolute;
  top: calc(100% + 0.4rem);
  inset-inline-end: 0;
  inset-inline-start: auto;
  z-index: 1200;
  min-width: 100%;
  display: grid;
  gap: 0.15rem;
  padding: 0.35rem;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-surface);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.locale-menu[hidden] {
  display: none !important;
}

.locale-option {
  appearance: none;
  border: 0;
  margin: 0;
  width: 100%;
  min-height: 2.1rem;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  background: transparent;
  color: var(--color-text);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
  cursor: pointer;
}

.locale-option:hover {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.locale-option.is-active {
  background: var(--color-primary);
  color: #fff;
}

html[data-theme='dark'] .locale-trigger,
html[data-theme='dark'] .locale-menu {
  background: var(--color-muted);
}

html[data-theme='dark'] .locale-menu {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html[dir='rtl'] .breadcrumbs .sep {
  display: inline-block;
  transform: scaleX(-1);
}

.auth-slot {
  display: flex;
  align-items: center;
  align-self: center;
  gap: 0.35rem;
  height: 36px;
}

/* Compact Sign in / Sign up / Logout in header */
.auth-slot .btn,
.btn-auth {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 0.7rem;
  font-size: 0.78rem;
  line-height: 1;
  box-shadow: 0 4px 12px rgba(var(--color-primary-rgb), 0.16);
}

.auth-slot .auth-mobile.icon-btn {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  font-size: 0.95rem;
}

/* Keep auth icons (profile / dashboard) same size as search + theme */
.auth-slot .icon-btn.header-icon-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  font-size: 0;
}

.auth-slot .icon-btn.header-icon-btn svg {
  width: 18px;
  height: 18px;
  max-width: none;
  flex-shrink: 0;
}

/* Keep auth icons (profile / dashboard) same size as search + theme */
.auth-slot .icon-btn.header-icon-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  font-size: 0;
}

.auth-slot .icon-btn.header-icon-btn svg {
  width: 18px;
  height: 18px;
  max-width: none;
  flex-shrink: 0;
}

.auth-mobile {
  display: grid;
}

.auth-desk {
  display: none;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  line-height: 1;
}

.mobile-toggle {
  display: grid;
  place-items: center;
}

.hamburger {
  width: 18px;
  height: 14px;
  display: grid;
  align-content: space-between;
}

.hamburger span {
  display: block;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.mobile-toggle.is-open .hamburger span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.mobile-toggle.is-open .hamburger span:nth-child(2) {
  opacity: 0;
}

.mobile-toggle.is-open .hamburger span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.mobile-nav {
  display: grid;
  grid-template-rows: 0fr;
  border-top: 1px solid transparent;
  background: var(--color-surface);
  transition: grid-template-rows 0.35s ease, border-color 0.2s ease;
}

.mobile-nav > .container {
  overflow: hidden;
  min-height: 0;
}

.mobile-nav.open {
  grid-template-rows: 1fr;
  border-top-color: var(--color-border);
}

.mobile-nav.open > .container {
  padding: 0.35rem 0 1.1rem;
  max-height: min(75vh, 640px);
  overflow: auto;
}

body.nav-open {
  overflow: hidden;
}

.mobile-acc {
  border-bottom: 1px solid var(--color-border);
}

.mobile-acc > button {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
  border: 0;
  padding: 0.9rem 0;
  font: inherit;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
}

.mobile-acc .chevron {
  color: var(--color-text-muted);
  transition: transform 0.2s ease;
}

.mobile-acc.open .chevron {
  transform: rotate(180deg);
}

.mobile-acc-panel {
  display: none;
  padding: 0 0 0.75rem 0.25rem;
}

.mobile-acc.open .mobile-acc-panel {
  display: grid;
  gap: 0.15rem;
}

.mobile-acc-panel a {
  padding: 0.45rem 0.5rem;
  border-radius: 8px;
  color: var(--color-text-muted);
}

.mobile-acc-panel a:hover {
  background: var(--color-accent-soft);
  color: var(--color-primary);
}

.mobile-links {
  display: grid;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--color-border);
}

.mobile-links a {
  padding: 0.55rem 0;
  font-weight: 600;
  color: var(--color-text);
}

/* ——— Hero ——— */
.eyebrow {
  margin: 0 0 0.65rem;
  color: var(--color-primary);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.salawat {
  font-size: 0.55em;
  vertical-align: super;
  color: var(--color-accent);
}

/* Featured home hero (admin homepage-editor preview) */
.hero-featured {
  position: relative;
  overflow: hidden;
  padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(1.5rem, 4vw, 2.5rem);
  min-height: min(94vh, 56rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: transparent;
}

html[data-theme='dark'] .hero-featured {
  background: transparent;
}

.hero-featured::after {
  display: none;
}

/* Hero copy — inherits .container width/margins (do NOT set width:100% here) */
.hero-featured-inner {
  position: relative;
  z-index: 5;
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: center;
}

.hero-featured-media {
  display: none !important;
}

.hero-featured-copy {
  max-width: min(40rem, 100%);
  margin: 0;
  text-align: start;
}

.featured-label[hidden] {
  display: none !important;
}

.featured-label {
  margin: 0 0 0.55rem;
  color: var(--color-primary);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.4;
}

.hero-featured-copy h1 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4.2vw, 2.85rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--color-primary-dark);
}

.hero-featured-copy p {
  margin: 0 0 0.7rem;
  max-width: 38rem;
  color: var(--color-text);
  font-size: 1.05rem;
  line-height: 1.65;
}

.hero-featured-copy p:last-child {
  margin-bottom: 0;
}

html[data-theme='dark'] .hero-featured-copy h1 {
  color: #ecfdf5;
}

html[data-theme='dark'] .hero-featured-copy p {
  color: var(--color-text-muted);
}

/* Tall rounded portrait */
.media-portrait {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center;
  border-radius: 24px;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.12);
}

html[data-theme='dark'] .media-portrait {
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.45);
}

/* ——— Sections ——— */
.section {
  padding: 3rem 0;
  background: transparent;
}

.section-alt {
  background: transparent;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.35rem;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.2rem);
  letter-spacing: -0.02em;
  color: var(--color-primary);
}

.section-head p {
  margin: 0.35rem 0 0;
  color: var(--color-text-muted);
}

.preview-grid,
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.preview-card,
.article-card {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(var(--color-primary-rgb), 0.08);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(8px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

html[data-theme='dark'] .section-alt .preview-card,
html[data-theme='dark'] .section-alt .article-card {
  background: #0b1220;
}

.preview-card:hover,
.article-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.preview-media,
.article-card .thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--color-accent-soft);
}

.preview-media img,
.article-card .thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-fallback {
  background:
    linear-gradient(
      135deg,
      rgba(var(--color-primary-rgb), 0.28),
      rgba(var(--color-primary-rgb), 0.16)
    ),
    url('/assets/img/green-dome-home.png') center/cover;
}

.preview-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(var(--color-primary-rgb), 0.55));
}

.preview-media {
  position: relative;
}

.preview-card-simple {
  display: block;
  color: inherit;
  text-decoration: none;
}

.preview-card-simple:hover {
  color: inherit;
}

.preview-body-simple {
  text-align: center;
  padding: 0.85rem 1rem 1.1rem;
}

.preview-body-simple h3 {
  margin: 0;
  color: var(--color-primary);
}

.preview-card-simple:hover .preview-body-simple h3 {
  color: var(--color-primary-dark);
}

.preview-body,
.article-card .body {
  padding: 1rem 1.1rem 1.2rem;
}

.preview-body h3,
.article-card h3 {
  margin: 0.25rem 0 0.45rem;
  font-size: 1.3rem;
}

.preview-body p,
.article-card p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.article-card .meta {
  color: var(--color-primary);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.read-more {
  display: inline-flex;
  margin-top: 0.85rem;
  font-weight: 600;
  font-size: 0.92rem;
}

/* Featured moment (screenshot style) */
.gallery-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 1fr);
  gap: 0.85rem;
  overflow-x: auto;
  padding-bottom: 0.4rem;
  scroll-snap-type: x mandatory;
}

.gallery-tile {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  scroll-snap-align: start;
  box-shadow: var(--shadow-green);
  transition: box-shadow 0.3s ease;
}

.gallery-tile:hover {
  box-shadow: var(--shadow-hover);
}

.gallery-tile img {
  width: 100%;
  height: 210px;
  object-fit: cover;
}

.gallery-tile span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.8rem 1rem;
  color: #fff;
  font-weight: 600;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.65));
}

.timeline-cards {
  display: grid;
  gap: 0.85rem;
}

.timeline-card {
  display: grid;
  gap: 0.25rem;
  padding: 1rem 1.1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: inherit;
  box-shadow: var(--shadow-green);
}

.timeline-card .meta {
  color: var(--color-primary);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.empty-soft {
  padding: 1.4rem;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius);
  text-align: center;
  color: var(--color-text-muted);
}

.quote-block {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-inline-start: 4px solid var(--color-primary);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-green);
}

#home-hadith .quote-block {
  text-align: center;
  border-inline-start: 4px solid var(--color-primary);
  border-inline-end: 4px solid var(--color-primary);
}

.quote-block .eyebrow {
  margin-bottom: 0.85rem;
}

.quote-block blockquote {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.55rem;
}

.quote-block cite {
  display: block;
  margin-top: 0.75rem;
  color: var(--color-text-muted);
  font-style: normal;
}

.cta-banner {
  display: grid;
  gap: 1.25rem;
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background: linear-gradient(135deg, var(--color-accent-soft), var(--color-surface));
  box-shadow: var(--shadow-green);
}

.cta-banner h2 {
  margin: 0 0 0.35rem;
}

.cta-banner p {
  margin: 0;
  color: var(--color-text-muted);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: var(--delay, 0s);
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ——— Footer (full brand-green, tall, multi-column, start-aligned) ——— */
.site-footer {
  margin-top: 0;
  background: var(--color-primary);
  border-top: none;
  color: #ffffff;
  text-align: start;
}

html[data-theme='dark'] .site-footer {
  background: var(--color-primary);
  color: #ffffff;
}

.site-footer,
.site-footer .footer-inner,
.site-footer .footer-grid,
.site-footer .footer-brand,
.site-footer .footer-col,
.site-footer .footer-blurb,
.site-footer .footer-heading,
.site-footer .footer-contact,
.site-footer .footer-meta,
.site-footer .footer-cta,
.site-footer .footer-cta-text,
.site-footer .footer-bottom,
.site-footer .footer-copy {
  text-align: start;
}

.site-footer .footer-inner {
  padding: 5.25rem 0 4rem;
}

.site-footer .footer-grid {
  display: grid;
  grid-template-columns: 1.55fr 1fr 1.1fr 0.9fr 1.15fr;
  gap: 3rem 2.25rem;
  justify-items: start;
  align-items: start;
}

.site-footer .footer-brand,
.site-footer .footer-col {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.site-footer .footer-logo {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: #ffffff;
  display: inline-block;
  margin-bottom: 0.95rem;
}

.site-footer .footer-blurb {
  margin: 0;
  max-width: 34ch;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.95rem;
  line-height: 1.7;
}

.site-footer .footer-heading {
  margin: 0 0 1.15rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffffff;
}

.site-footer .footer-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.65rem;
}

.site-footer .footer-links a,
.site-footer .footer-contact a {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.95rem;
  line-height: 1.4;
  text-decoration: none;
  transition: color var(--transition), text-decoration-color var(--transition);
}

.site-footer .footer-links a:hover,
.site-footer .footer-contact a:hover,
.site-footer .footer-cta-link:hover,
.site-footer .footer-logo:hover {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.site-footer .footer-contact {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}

.site-footer .footer-meta {
  margin: 0;
  max-width: 28ch;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.88rem;
  line-height: 1.55;
}

.site-footer .footer-cta {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.75rem;
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.site-footer .footer-cta-text {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.95rem;
  line-height: 1.55;
  max-width: 48ch;
}

.site-footer .footer-cta-link {
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 600;
  transition: color var(--transition), text-decoration-color var(--transition);
}

/* Same green as body; subtle divider above copyright */
.site-footer .footer-bottom {
  background: transparent;
  padding: 1.5rem 0;
  text-align: start;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.site-footer .footer-copy {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  width: 100%;
  text-align: start;
}

@media (max-width: 1100px) {
  .site-footer .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 2.5rem 1.75rem;
  }

  .site-footer .footer-brand {
    grid-column: 1 / -1;
    max-width: 42ch;
  }
}

@media (max-width: 720px) {
  .site-footer .footer-inner {
    padding: 4rem 0 3rem;
  }

  .site-footer .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.25rem 1.5rem;
    justify-items: start;
  }

  .site-footer .footer-brand {
    grid-column: 1 / -1;
    max-width: none;
  }

  .site-footer .footer-cta {
    margin-top: 3rem;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .site-footer .footer-inner {
    padding: 3.5rem 0 2.75rem;
  }

  .site-footer .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    justify-items: start;
  }

  .site-footer .footer-brand,
  .site-footer .footer-col,
  .site-footer .footer-links,
  .site-footer .footer-contact,
  .site-footer .footer-cta {
    align-items: flex-start;
  }

  .site-footer .footer-blurb {
    max-width: none;
  }
}

/* ——— Shared page shells ——— */
.page-hero {
  padding: 2.5rem 0 1rem;
  background: var(--color-surface);
}

.page-hero h1 {
  margin: 0 0 0.5rem;
  color: var(--color-primary);
}

.page-hero p {
  margin: 0;
  color: var(--color-text-muted);
}

.form-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-green);
  max-width: 480px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
}

.form-label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
}

/* Segmented Article | Poem control (admin forms) */
.content-type-seg {
  display: inline-flex;
  padding: 0.2rem;
  gap: 0.15rem;
  border-radius: 12px;
  background: rgba(var(--color-primary-rgb), 0.08);
  border: 1px solid rgba(var(--color-primary-rgb), 0.12);
}

.content-type-seg__opt {
  position: relative;
  margin: 0 !important;
  cursor: pointer;
}

.content-type-seg__opt input {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100% !important;
  height: 100%;
  margin: 0;
  padding: 0 !important;
  cursor: pointer;
}

.content-type-seg__opt span {
  display: block;
  padding: 0.5rem 1.15rem;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--color-text-muted);
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  user-select: none;
}

.content-type-seg__opt:hover span {
  color: var(--color-primary);
}

.content-type-seg__opt input:checked + span {
  background: var(--color-surface);
  color: var(--color-primary);
  box-shadow: 0 1px 4px rgba(var(--color-primary-rgb), 0.16);
}

.content-type-seg__opt input:focus-visible + span {
  outline: 2px solid rgba(var(--color-primary-rgb), 0.45);
  outline-offset: 1px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  font: inherit;
  background: var(--color-surface);
  color: var(--color-text);
}

.form-group input:focus-visible,
.form-group textarea:focus-visible,
.form-group select:focus-visible {
  border-color: var(--color-primary);
  outline: 2px solid rgba(var(--color-primary-rgb), 0.35);
  outline-offset: 0;
}

.form-group input[type='file'] {
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 0.55rem 0;
  border: 0;
  background: transparent;
  font-size: 0.9rem;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.35rem;
}

.form-group input:focus-visible,
.form-group textarea:focus-visible,
.form-group select:focus-visible {
  border-color: var(--color-primary);
  outline: 2px solid rgba(var(--color-primary-rgb), 0.35);
  outline-offset: 0;
}

.form-group input[type='file'] {
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 0.55rem 0;
  border: 0;
  background: transparent;
  font-size: 0.9rem;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.35rem;
}

.form-group input[type='file'] {
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 0.55rem 0;
  border: 0;
  background: transparent;
  font-size: 0.9rem;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.35rem;
}

.alert {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
}

.alert-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.alert-success {
  background: var(--color-primary-soft);
  color: var(--color-primary);
  border: 1px solid rgba(var(--color-primary-rgb), 0.35);
}

.admin-toast-stack {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  z-index: 10000;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 0.5rem;
  width: min(520px, calc(100vw - 2rem));
  transform: translateX(-50%);
  pointer-events: none;
}

.admin-toast {
  width: 100%;
  margin-bottom: 0;
  box-shadow:
    0 10px 28px rgba(15, 23, 42, 0.14),
    0 2px 8px rgba(15, 23, 42, 0.08);
  opacity: 0;
  transform: translateY(0.75rem);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
  cursor: pointer;
  pointer-events: auto;
}

.admin-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.admin-toast.is-leaving {
  opacity: 0;
  transform: translateY(0.35rem);
}

.admin-toast a {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.gallery-grid {
  display: grid;
  gap: 1rem;
}

.library-grid,
.library-teaser-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.library-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
}

.library-filter-chip {
  appearance: none;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.85rem;
  font: inherit;
  font-size: 0.92rem;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.library-filter-chip:hover {
  border-color: rgba(var(--color-primary-rgb), 0.45);
}

.library-filter-chip.is-active {
  background: var(--color-primary-soft);
  border-color: rgba(var(--color-primary-rgb), 0.4);
  color: var(--color-primary-dark);
  font-weight: 600;
}

.library-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-green);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.library-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.library-card-link {
  display: flex;
  flex-direction: column;
  flex: 1;
  color: inherit;
  text-decoration: none;
  min-height: 100%;
}

.library-card-cover {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--color-muted);
}

.library-card-cover img,
.library-cover-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.library-cover-fallback {
  background:
    linear-gradient(
      160deg,
      rgba(var(--color-primary-rgb), 0.28),
      rgba(var(--color-primary-rgb), 0.1)
    ),
    url('/assets/img/green-dome-home.png') center/cover;
}

.library-card-body {
  padding: 1rem 1.05rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
}

.library-card-cat {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-primary);
  font-weight: 600;
}

.library-card-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1.25;
  margin: 0;
  color: var(--color-text);
}

.library-card h2.library-card-title {
  font-size: 1.4rem;
}

.library-card-meta {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.library-card-cta {
  margin-top: auto;
  align-self: flex-start;
}

.library-card-cta-text {
  margin-top: auto;
  color: var(--color-primary);
  font-weight: 600;
  font-size: 0.95rem;
}

.library-empty {
  color: var(--color-text-muted);
  margin-top: 1rem;
}

/* ——— Quiz ——— */
.quiz-page {
  position: relative;
  isolation: isolate;
  padding-bottom: clamp(3rem, 6vw, 4.5rem);
}

.quiz-hero {
  position: relative;
  isolation: isolate;
  padding: clamp(1.25rem, 3.2vw, 2rem) 0 clamp(0.85rem, 2.2vw, 1.35rem);
  margin-bottom: 0.25rem;
  overflow: hidden;
}

.quiz-hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(
      ellipse 48% 70% at 88% 28%,
      rgba(var(--color-primary-rgb), 0.14) 0%,
      transparent 68%
    ),
    radial-gradient(
      ellipse 55% 65% at 8% 72%,
      rgba(var(--color-primary-rgb), 0.08) 0%,
      transparent 70%
    ),
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.55) 0%,
      transparent 55%
    ),
    var(--color-page);
}

.quiz-hero-bg::before {
  content: '';
  position: absolute;
  width: min(28rem, 72vw);
  height: min(28rem, 72vw);
  top: 50%;
  right: max(-6rem, -12vw);
  transform: translateY(-52%);
  border-radius: 50%;
  background:
    radial-gradient(
      circle at 45% 42%,
      rgba(var(--color-primary-rgb), 0.1) 0%,
      rgba(var(--color-primary-rgb), 0.04) 42%,
      transparent 72%
    );
  pointer-events: none;
  animation: quiz-aura-breathe 10s ease-in-out infinite alternate;
}

@keyframes quiz-aura-breathe {
  from { opacity: 0.7; transform: translateY(-52%) scale(1); }
  to { opacity: 1; transform: translateY(-54%) scale(1.06); }
}

.quiz-hero-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(1.25rem, 4vw, 2.5rem);
  color: var(--color-text);
}

.quiz-hero-copy {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 31rem;
}

.quiz-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.4vw, 2.95rem);
  font-weight: 600;
  margin: 0 0 0.35rem;
  letter-spacing: -0.02em;
  color: var(--color-primary-dark);
  animation: quiz-hero-copy-in 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.quiz-hero-lead {
  margin: 0;
  font-size: clamp(0.95rem, 1.7vw, 1.03rem);
  line-height: 1.5;
  color: var(--color-text-muted);
  max-width: 28rem;
  animation: quiz-hero-copy-in 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

@keyframes quiz-hero-copy-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.quiz-hero-dome {
  position: relative;
  margin: 0;
  flex: 0 0 auto;
  width: clamp(4.5rem, 12vw, 6.5rem);
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(var(--color-primary-rgb), 0.2);
  box-shadow:
    0 0 0 7px rgba(var(--color-primary-rgb), 0.06),
    var(--shadow-soft);
  animation: quiz-dome-float 7.5s ease-in-out infinite;
}

.quiz-hero-dome::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  pointer-events: none;
}

.quiz-hero-dome img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 28%;
}

@keyframes quiz-dome-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.quiz-main {
  margin-top: 0.15rem;
}

.quiz-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.quiz-card {
  background: var(--color-surface);
  border: 1px solid rgba(var(--color-primary-rgb), 0.1);
  border-radius: calc(var(--radius) + 2px);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
  animation-delay: var(--delay, 0s);
}

.quiz-card:hover {
  transform: translateY(-4px);
  border-color: rgba(var(--color-primary-rgb), 0.22);
  box-shadow: var(--shadow-hover);
}

.quiz-card-link {
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
  height: 100%;
}

.quiz-card-cover {
  position: relative;
  aspect-ratio: 16 / 7;
  overflow: hidden;
  background:
    linear-gradient(155deg, rgba(var(--color-primary-rgb), 0.18), rgba(var(--color-primary-rgb), 0.05)),
    var(--color-muted);
}

.quiz-card-cover::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(to top, rgba(2, 44, 34, 0.22), transparent);
  pointer-events: none;
  opacity: 0.55;
}

.quiz-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.55s ease;
}

.quiz-card:hover .quiz-card-cover img {
  transform: scale(1.045);
}

.quiz-card-body {
  padding: 0.78rem 0.9rem 0.88rem;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  flex: 1;
}

.quiz-card-cat {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-primary);
  font-weight: 600;
}

.quiz-card-title {
  font-family: var(--font-display);
  font-size: clamp(1.08rem, 1.7vw, 1.24rem);
  line-height: 1.24;
  margin: 0;
  color: var(--color-text);
}

.quiz-card-meta {
  margin: 0.1rem 0 0;
  color: var(--color-text-muted);
  font-size: 0.89rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.quiz-card-credit {
  margin: 0.08rem 0 0;
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

.quiz-card-cta {
  margin-top: auto;
  padding-top: 0.7rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
  border-top: 1px solid rgba(var(--color-primary-rgb), 0.08);
  color: var(--color-primary);
  font-weight: 600;
  font-size: 0.9rem;
}

.quiz-card-count {
  font-weight: 500;
  color: var(--color-text-muted);
  font-size: 0.81rem;
}

.quiz-empty {
  color: var(--color-text-muted);
  margin-top: 1rem;
}

.quiz-play-nav {
  margin: 0 0 1.15rem;
}

.quiz-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s ease, gap 0.2s ease;
}

.quiz-back-link:hover {
  color: var(--color-primary-dark);
  gap: 0.5rem;
  text-decoration: none;
}

.quiz-play-header {
  margin-bottom: 1.35rem;
  padding-bottom: 1.15rem;
  border-bottom: 1px solid rgba(var(--color-primary-rgb), 0.1);
  max-width: 42rem;
}

.quiz-play-credit {
  margin: 0 0 0.35rem;
  font-size: 0.88rem;
  color: var(--color-primary);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.quiz-play-title {
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 3.5vw, 2.25rem);
  margin: 0 0 0.4rem;
  line-height: 1.25;
  color: var(--color-primary-dark);
}

.quiz-play-desc {
  margin: 0 0 1.1rem;
  color: var(--color-text-muted);
  max-width: 40rem;
  line-height: 1.55;
}

.quiz-progress {
  max-width: 28rem;
}

.quiz-progress-track {
  height: 7px;
  border-radius: 999px;
  background: rgba(var(--color-primary-rgb), 0.12);
  overflow: hidden;
}

.quiz-progress-bar {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    var(--color-primary) 0%,
    #0a6b52 100%
  );
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.quiz-progress-label {
  margin: 0.45rem 0 0;
  font-size: 0.88rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

.quiz-play-body {
  max-width: 40rem;
}

.quiz-question {
  background: var(--color-surface);
  border: 1px solid rgba(var(--color-primary-rgb), 0.1);
  border-radius: calc(var(--radius) + 2px);
  padding: clamp(1.25rem, 3vw, 1.6rem);
  box-shadow: var(--shadow-soft);
  animation: quiz-question-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes quiz-question-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.quiz-q-section {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-primary);
  font-weight: 600;
}

.quiz-q-prompt {
  font-family: var(--font-display);
  font-size: clamp(1.28rem, 2.6vw, 1.6rem);
  margin: 0 0 1.2rem;
  line-height: 1.35;
  color: var(--color-text);
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.quiz-option {
  appearance: none;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  width: 100%;
  text-align: start;
  font: inherit;
  cursor: pointer;
  padding: 0.95rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(var(--color-primary-rgb), 0.12);
  background: var(--color-page);
  color: var(--color-text);
  transition:
    border-color 0.22s ease,
    background 0.22s ease,
    transform 0.22s ease,
    box-shadow 0.22s ease;
}

.quiz-option:hover:not(:disabled) {
  border-color: rgba(var(--color-primary-rgb), 0.4);
  background: rgba(var(--color-primary-rgb), 0.05);
  box-shadow: 0 2px 10px rgba(var(--color-primary-rgb), 0.08);
  transform: translateX(3px);
}

.quiz-option:focus-visible {
  outline: 2px solid rgba(var(--color-primary-rgb), 0.45);
  outline-offset: 2px;
}

.quiz-option:disabled {
  cursor: default;
}

.quiz-option-letter {
  flex-shrink: 0;
  width: 1.85rem;
  height: 1.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(var(--color-primary-rgb), 0.12);
  color: var(--color-primary-dark);
  font-weight: 700;
  font-size: 0.82rem;
  margin-top: 0.05rem;
}

.quiz-option.is-correct {
  border-color: rgba(22, 101, 52, 0.5);
  background: rgba(22, 101, 52, 0.1);
  box-shadow: none;
  transform: none;
}

.quiz-option.is-correct .quiz-option-letter {
  background: rgba(22, 101, 52, 0.2);
  color: #166534;
}

.quiz-option.is-wrong {
  border-color: rgba(153, 27, 27, 0.35);
  background: rgba(153, 27, 27, 0.07);
  box-shadow: none;
  transform: none;
}

.quiz-option.is-wrong .quiz-option-letter {
  background: rgba(153, 27, 27, 0.14);
  color: #991b1b;
}

.quiz-feedback {
  margin: 1.1rem 0 0;
  font-weight: 600;
  font-size: 0.98rem;
  animation: quiz-hero-copy-in 0.35s ease both;
}

.quiz-feedback.is-correct {
  color: #166534;
}

.quiz-feedback.is-wrong {
  color: #991b1b;
}

.quiz-next {
  margin-top: 1.2rem;
}

.quiz-results {
  position: relative;
  text-align: center;
  padding: clamp(2rem, 4vw, 2.6rem) 1.35rem;
  background:
    radial-gradient(
      ellipse 70% 60% at 50% 0%,
      rgba(var(--color-primary-rgb), 0.08) 0%,
      transparent 70%
    ),
    var(--color-surface);
  border: 1px solid rgba(var(--color-primary-rgb), 0.12);
  border-radius: calc(var(--radius) + 2px);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.quiz-results-kicker {
  margin: 0 0 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  color: var(--color-primary);
  font-weight: 600;
}

.quiz-results-score {
  font-family: var(--font-display);
  font-size: clamp(3.1rem, 8vw, 4.4rem);
  margin: 0;
  color: var(--color-primary-dark);
  line-height: 1;
  animation: quiz-score-pop 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes quiz-score-pop {
  from {
    opacity: 0;
    transform: scale(0.88);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.quiz-results-detail {
  margin: 0.7rem 0 0;
  color: var(--color-text-muted);
  font-size: 1.02rem;
}

.quiz-source {
  margin: 1rem 0 0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.quiz-results-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: center;
  margin-top: 1.6rem;
}

.category-featured {
  margin: 0 0 1.5rem;
}

.quiz-wives-feature {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin: 0 0 0.85rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(var(--color-primary-rgb), 0.1);
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.quiz-wives-feature:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.quiz-wives-feature-media {
  aspect-ratio: 16 / 5;
  max-height: 9.5rem;
  overflow: hidden;
  background:
    linear-gradient(160deg, rgba(var(--color-primary-rgb), 0.28), rgba(var(--color-primary-rgb), 0.08)),
    var(--color-muted);
}

.quiz-wives-feature-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.quiz-wives-feature-body {
  padding: 0.72rem 0.9rem 0.82rem;
}

.quiz-wives-feature-kicker {
  margin: 0 0 0.2rem;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-primary);
  font-weight: 600;
}

.quiz-wives-feature-title {
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.55vw, 1.12rem);
  margin: 0 0 0.22rem;
  line-height: 1.22;
}

.quiz-wives-feature-desc {
  margin: 0 0 0.38rem;
  color: var(--color-text-muted);
  font-size: 0.84rem;
  line-height: 1.38;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.quiz-wives-feature-cta {
  color: var(--color-primary);
  font-weight: 600;
  font-size: 0.84rem;
}

@media (max-width: 520px) {
  .quiz-hero-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .quiz-hero-dome {
    align-self: flex-end;
    width: 4rem;
  }
}

@media (min-width: 640px) {
  .quiz-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.1rem;
  }

  .quiz-wives-feature {
    grid-template-columns: minmax(7.5rem, 9.5rem) 1fr;
    align-items: center;
  }

  .quiz-wives-feature-media {
    aspect-ratio: 1;
    max-height: 7.5rem;
    height: 100%;
    align-self: stretch;
  }

  .quiz-wives-feature-body {
    padding: 0.68rem 0.95rem 0.72rem;
  }
}

@media (min-width: 1024px) {
  .quiz-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

html[data-theme='dark'] .quiz-hero-bg {
  background:
    radial-gradient(
      ellipse 48% 70% at 88% 28%,
      rgba(var(--color-primary-rgb), 0.22) 0%,
      transparent 68%
    ),
    radial-gradient(
      ellipse 55% 65% at 8% 72%,
      rgba(var(--color-primary-rgb), 0.14) 0%,
      transparent 70%
    ),
    linear-gradient(
      180deg,
      rgba(17, 24, 39, 0.45) 0%,
      transparent 55%
    ),
    var(--color-page);
}

html[data-theme='dark'] .quiz-option {
  background: rgba(15, 23, 42, 0.55);
}

@media (prefers-reduced-motion: reduce) {
  .quiz-hero-bg::before,
  .quiz-hero-dome,
  .quiz-hero h1,
  .quiz-hero-lead,
  .quiz-results-score,
  .quiz-question,
  .quiz-feedback,
  .quiz-card,
  .quiz-card-cover img,
  .quiz-option,
  .quiz-back-link,
  .quiz-progress-bar {
    animation: none !important;
    transition: none !important;
  }
}

.gallery-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-green);
  transition: box-shadow 0.3s ease;
}

.gallery-item:hover {
  box-shadow: var(--shadow-hover);
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.gallery-item figcaption {
  padding: 0.85rem 1rem 1rem;
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.table th,
.table td {
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--color-border);
  text-align: start;
}

.table th {
  background: var(--color-muted);
}

.badge {
  display: inline-flex;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.admin-shell {
  display: grid;
  min-height: 100vh;
  --admin-sidebar-w: 260px;
}

html:has(.admin-shell),
body:has(.admin-shell) {
  height: 100%;
  overflow: hidden;
  background: #f3f6f4;
}

.admin-sidebar {
  position: relative;
  background:
    linear-gradient(180deg, #064e3b 0%, #043b2d 55%, #022c22 100%);
  color: #fff;
  padding: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-sidebar-inner {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 1.35rem 1rem 1.15rem;
  gap: 0.35rem;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.35rem 0.65rem 1rem;
  margin: 0 0 0.35rem;
  color: #fff !important;
  text-decoration: none !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-brand-mark {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 10px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.admin-brand-text {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: #fff;
}

.admin-brand-text .brand-tld {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 600;
}

.admin-sidebar-label {
  margin: 0.55rem 0.65rem 0.35rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
}

.admin-nav-link,
.admin-sidebar a.admin-nav-link {
  display: flex;
  align-items: center;
  min-height: 2.45rem;
  padding: 0.55rem 0.8rem;
  margin: 0;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.2;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.admin-nav-link:hover,
.admin-sidebar a.admin-nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.admin-nav-link.is-active,
.admin-sidebar a.admin-nav-link.is-active,
.admin-sidebar a.active {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-weight: 600;
  box-shadow: inset 3px 0 0 #fff;
}

.admin-sidebar-foot {
  margin-top: auto;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.admin-nav-logout {
  color: rgba(255, 220, 220, 0.9) !important;
}

.admin-main {
  padding: clamp(1.35rem, 3vw, 2rem);
  background:
    radial-gradient(ellipse 70% 40% at 100% 0%, rgba(6, 78, 59, 0.06), transparent 55%),
    #f3f6f4;
  min-width: 0;
}

.admin-main > h1 {
  margin: 0 0 0.35rem;
  color: var(--color-primary);
  font-size: clamp(1.75rem, 3vw, 2.15rem);
  letter-spacing: -0.02em;
}

.admin-main > p {
  margin: 0 0 1.25rem;
}

.admin-main .form-group {
  margin-bottom: 0.85rem;
}

.admin-main .form-card,
.admin-main .table,
.admin-main .stat-card {
  border: 1px solid rgba(6, 78, 59, 0.1);
  border-radius: 16px;
  box-shadow: var(--shadow-green);
}

.admin-main .form-card {
  background: #fff;
  padding: 1.35rem 1.4rem;
}

.admin-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 16px;
  border: 1px solid rgba(6, 78, 59, 0.1);
  background: #fff;
  box-shadow: var(--shadow-green);
}

.admin-table-wrap .table {
  margin: 0;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  min-width: 36rem;
}

.admin-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 16px;
  border: 1px solid rgba(6, 78, 59, 0.1);
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
}

.admin-table-wrap .table {
  margin: 0;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  min-width: 36rem;
}

.admin-main .table {
  width: 100%;
  background: #fff;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
}

.admin-main .table th {
  background: rgba(6, 78, 59, 0.06);
  color: var(--color-primary);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 700;
}

.admin-main .table th,
.admin-main .table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(6, 78, 59, 0.08);
}

.admin-main .table tr:last-child td {
  border-bottom: 0;
}

.admin-main .table a {
  color: var(--color-primary);
  font-weight: 600;
}

.admin-main .table a.btn-primary,
.admin-main .table a.btn-primary:hover {
  color: #fff;
}

.admin-main .table a.btn-primary,
.admin-main .table a.btn-primary:hover {
  color: #fff;
}

.admin-main .badge {
  background: rgba(6, 78, 59, 0.1);
  color: var(--color-primary);
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  font-weight: 600;
}

.admin-main .hint {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
}

.stat-card {
  background: #fff;
  border: 1px solid rgba(6, 78, 59, 0.1);
  border-radius: 16px;
  padding: 1.15rem 1.2rem;
  box-shadow: var(--shadow-green);
}

.stat-card .label {
  color: var(--color-text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.stat-card .value {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--color-primary);
  margin-top: 0.25rem;
  line-height: 1.1;
}

.admin-dash-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.5rem;
}

.admin-main .btn-ghost {
  background: #fff;
  border-color: rgba(6, 78, 59, 0.18);
}

.admin-main .btn-ghost:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

@media (min-width: 640px) {
  .preview-grid,
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .timeline-cards {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .library-grid,
  .library-teaser-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .cta-banner,
  .cta-panel {
    grid-template-columns: 1.4fr auto;
    align-items: center;
  }
}

@media (min-width: 1024px) and (max-width: 1320px) {
  .brand {
    font-size: 1.45rem;
  }

  .header-inner {
    gap: 0.55rem;
  }

  .nav-desktop .nav-link {
    padding-inline: 0.45rem;
    font-size: 0.78rem;
  }

  .header-actions {
    gap: 0.35rem;
  }

  .auth-slot .btn-auth.auth-desk {
    padding-inline: 0.55rem;
    font-size: 0.72rem;
  }
}

@media (min-width: 1024px) {
  .nav-desktop {
    display: flex;
    align-items: center;
    align-self: stretch;
    flex: 1 1 0;
    justify-content: flex-start;
    gap: 0.05rem;
    min-height: var(--header-h);
    min-width: 0;
    /* overflow-x:auto forces overflow-y:auto in browsers and clips dropdown menus */
    overflow: visible;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-padding-inline: 0.35rem;
  }

  .nav-desktop .nav-link {
    padding-inline: 0.55rem;
    font-size: 0.8125rem;
  }

  .nav-desktop::-webkit-scrollbar {
    display: none;
  }

  .mobile-toggle {
    display: none;
  }

  .mobile-nav,
  .mobile-nav.open {
    display: none;
  }

  .auth-mobile {
    display: none;
  }

  .auth-desk {
    display: inline-flex;
  }

  .preview-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .gallery-strip {
    grid-auto-flow: dense;
    grid-template-columns: repeat(4, 1fr);
    overflow: visible;
  }

  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .library-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .library-teaser-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .timeline-cards {
    grid-template-columns: repeat(3, 1fr);
  }

  .admin-shell {
    grid-template-columns: var(--admin-sidebar-w, 260px) 1fr;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
  }

  .admin-sidebar {
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .admin-sidebar-inner {
    min-height: 100%;
  }

  .admin-main {
    overflow-y: auto;
    overscroll-behavior: contain;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
  }

  .stat-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 480px) {
  .brand {
    font-size: 1.45rem;
  }

  body:not(.page-home) .hero-featured {
    padding: 2rem 0 calc(4.25rem + 8rem);
    min-height: auto;
    margin-bottom: -8rem;
  }

  .hero-featured-copy h1 {
    max-width: none;
  }

  
}

/* ——— Enhancements ——— */
.hero-featured-copy .hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.hero-featured-copy .hero-cta .btn {
  border-radius: 999px;
  padding: 0.7rem 1.35rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.hero-copy-body p {
  margin: 0 0 0.75rem;
  max-width: 100%;
  color: var(--color-text);
  font-size: 1.05rem;
  line-height: 1.7;
  text-align: inherit;
}

.hero-copy-body p:last-child {
  margin-bottom: 0;
}

.start-path {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.start-path a {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.15rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: inherit;
  box-shadow: var(--shadow-green);
  transition: transform var(--transition), box-shadow var(--transition);
}

.start-path a:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  color: inherit;
}

.start-path .step-num {
  flex-shrink: 0;
  width: 2.2rem;
  height: 2.2rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
}

.start-path strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.start-path small {
  display: block;
  color: var(--color-text-muted);
  margin-top: 0.15rem;
}

/* ——— Homepage bands (below hero) ——— */
.home-band {
  padding: clamp(3.25rem, 6.5vw, 5rem) 0;
  position: relative;
  background: transparent;
}

.home-band-soft {
  background: transparent;
}

.home-band-path {
  --age-progress: 0%;
  padding: clamp(4.5rem, 9vw, 7rem) 0;
  position: relative;
  overflow: hidden;
  background: transparent;
  z-index: 1;
  isolation: auto;
}

.start-here-inner {
  width: min(100% - 2rem, 42rem);
  max-width: 100%;
  box-sizing: border-box;
}

.start-journey-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: start;
}

.start-journey-grid > .start-journey {
  min-width: 0;
}

.home-band-topics {
  background: transparent;
}

.home-band-hadith {
  --hadith-gap: 7000ms;
  padding: clamp(5rem, 11vw, 8rem) 0;
  position: relative;
  overflow: hidden;
  background: transparent;
  color: var(--color-text);
}

.hadith-band-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.hadith-band-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  animation: hadith-glow-drift 18s ease-in-out infinite alternate;
}

.hadith-band-glow--a {
  width: min(42rem, 90vw);
  height: min(42rem, 90vw);
  inset-inline-start: -12%;
  top: 8%;
  background: radial-gradient(circle, rgba(var(--color-primary-rgb), 0.16) 0%, transparent 68%);
}

.hadith-band-glow--b {
  width: min(32rem, 70vw);
  height: min(32rem, 70vw);
  inset-inline-end: -8%;
  bottom: 0;
  background: radial-gradient(circle, rgba(var(--color-primary-rgb), 0.12) 0%, transparent 70%);
  animation-delay: -6s;
}

.hadith-band-grid {
  position: absolute;
  inset: 12% 0;
  background:
    linear-gradient(90deg, rgba(var(--color-primary-rgb), 0.04) 1px, transparent 1px),
    linear-gradient(rgba(var(--color-primary-rgb), 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent);
  opacity: 0.45;
}

.hadith-container {
  position: relative;
  z-index: 1;
}

@keyframes hadith-glow-drift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  100% {
    transform: translate3d(2.5rem, -1.25rem, 0) scale(1.08);
  }
}

@keyframes hadith-slide-in {
  from {
    opacity: 0;
    transform: translate3d(var(--hadith-enter-x, 0), 18px, 0) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes hadith-slide-out {
  from {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    opacity: 0;
    transform: translate3d(var(--hadith-exit-x, 0), -10px, 0) scale(0.985);
  }
}

@keyframes hadith-quote-mark-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes hadith-dot-progress {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@keyframes hadith-orb-float {
  0%,
  100% {
    transform: translateY(-50%) translateX(0);
  }
  50% {
    transform: translateY(calc(-50% - 10px)) translateX(6px);
  }
}

.home-band-cta {
  background: transparent;
}

.section-eyebrow {
  margin: 0 0 0.5rem;
  color: var(--color-primary);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.home-band-hadith .section-eyebrow {
  color: var(--color-primary);
}

.section-head-center {
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 2rem;
}

.section-head-center h2 {
  max-width: 18ch;
}

.section-head-center p {
  max-width: 42ch;
}

.section-link {
  font-weight: 600;
  color: var(--color-primary);
  white-space: nowrap;
}

.section-link:hover {
  text-decoration: underline;
}

.start-journey {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.28rem;
  position: relative;
}

.start-journey::before {
  content: '';
  position: absolute;
  inset-block: 1.65rem;
  inset-inline-start: 1.55rem;
  width: 2px;
  background: linear-gradient(
    180deg,
    rgba(var(--color-primary-rgb), 0.08),
    rgba(var(--color-primary-rgb), 0.38) 18%,
    rgba(var(--color-primary-rgb), 0.22) 50%,
    rgba(var(--color-primary-rgb), 0.38) 82%,
    rgba(var(--color-primary-rgb), 0.08)
  );
  border-radius: 999px;
  pointer-events: none;
}

.start-journey-step {
  position: relative;
}

.start-journey a {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.85rem 1rem;
  padding: 0.85rem 0.95rem 0.85rem 0.35rem;
  border-radius: 14px;
  background: transparent;
  border: 1px solid transparent;
  color: inherit;
  transition:
    transform 0.3s ease,
    background-color 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.start-journey a:hover,
.start-journey a:focus-visible {
  transform: translateX(4px);
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(var(--color-primary-rgb), 0.18);
  box-shadow: var(--shadow-hover);
  color: inherit;
}

html[dir='rtl'] .start-journey a:hover,
html[dir='rtl'] .start-journey a:focus-visible {
  transform: translateX(-4px);
}

html[data-theme='dark'] .start-journey a:hover,
html[data-theme='dark'] .start-journey a:focus-visible {
  background: rgba(17, 24, 39, 0.78);
  box-shadow: var(--shadow-hover);
}

.start-journey-index {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--color-primary);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.92), rgba(var(--color-primary-rgb), 0.08)),
    var(--color-surface);
  border: 2px solid rgba(var(--color-primary-rgb), 0.28);
  box-shadow: 0 0 0 4px rgba(var(--color-primary-rgb), 0.06);
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease,
    color 0.3s ease,
    box-shadow 0.3s ease,
    transform 0.3s ease;
}

html[data-theme='dark'] .start-journey-index {
  background:
    linear-gradient(160deg, rgba(31, 41, 55, 0.95), rgba(var(--color-primary-rgb), 0.22)),
    var(--color-surface);
}

.start-journey a:hover .start-journey-index,
.start-journey a:focus-visible .start-journey-index {
  color: #fff;
  background: linear-gradient(160deg, var(--color-primary), var(--color-primary-dark));
  border-color: var(--color-primary);
  box-shadow: 0 0 0 5px rgba(var(--color-primary-rgb), 0.14);
  transform: scale(1.04);
}

.start-journey-copy strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.18rem;
  line-height: 1.2;
  color: var(--color-primary-dark);
  transition: color 0.25s ease;
}

html[data-theme='dark'] .start-journey-copy strong {
  color: #ecfdf5;
}

.start-journey a:hover .start-journey-copy strong,
.start-journey a:focus-visible .start-journey-copy strong {
  color: var(--color-primary);
}

.start-journey-copy small {
  display: block;
  margin-top: 0.28rem;
  color: var(--color-text-muted);
  font-size: 0.94rem;
  line-height: 1.5;
}

.start-journey-arrow {
  color: var(--color-primary);
  opacity: 0.35;
  font-size: 1.15rem;
  transition: transform 0.28s ease, opacity 0.28s ease;
}

.start-journey a:hover .start-journey-arrow,
.start-journey a:focus-visible .start-journey-arrow {
  opacity: 1;
  transform: translateX(5px);
}

html[dir='rtl'] .start-journey a:hover .start-journey-arrow,
html[dir='rtl'] .start-journey a:focus-visible .start-journey-arrow {
  transform: translateX(-5px);
}

.topics-mosaic {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.15rem;
}

/* Character cover is portrait — keep a true portrait frame on mobile */

/* Character — green dome: crop sky, keep dome in frame (slug-based; avoids nth-child order bugs) */

.hadith-head {
  text-align: center;
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
  max-width: 44rem;
  margin-inline: auto;
}

.hadith-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5vw, 3.35rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-primary-dark);
  letter-spacing: -0.02em;
}

.hadith-slider {
  position: relative;
  max-width: min(56rem, 100%);
  margin: 0 auto;
}

.hadith-slider-stage {
  position: relative;
  padding-inline: clamp(3rem, 8vw, 4.5rem);
}

.hadith-decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: visible;
}

.hadith-decor-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.hadith-decor-orb--lg {
  width: min(16rem, 52vw);
  height: min(16rem, 52vw);
  inset-inline-end: -8%;
  top: 42%;
  transform: translateY(-50%);
  background:
    radial-gradient(
      circle at 40% 40%,
      rgba(var(--color-primary-rgb), 0.14) 0%,
      rgba(var(--color-primary-rgb), 0.05) 48%,
      transparent 74%
    );
  animation: hadith-orb-float 12s ease-in-out infinite;
}

.hadith-decor-orb--sm {
  width: min(8rem, 32vw);
  height: min(8rem, 32vw);
  inset-inline-start: -4%;
  bottom: 8%;
  background:
    radial-gradient(
      circle at 50% 50%,
      rgba(var(--color-primary-rgb), 0.1) 0%,
      rgba(var(--color-primary-rgb), 0.03) 55%,
      transparent 75%
    );
  animation: hadith-orb-float 14s ease-in-out infinite reverse;
}

.hadith-slider-viewport {
  position: relative;
  z-index: 1;
}

.hadith-quote-mark {
  position: absolute;
  inset-inline-start: clamp(1.5rem, 4vw, 2.25rem);
  top: clamp(0.5rem, 2vw, 1rem);
  z-index: 2;
  color: rgba(var(--color-primary-rgb), 0.14);
  pointer-events: none;
  line-height: 0;
}

.hadith-quote-mark svg {
  width: clamp(2.75rem, 6vw, 4rem);
  height: auto;
  display: block;
}

.hadith-slider-track {
  display: grid;
  align-items: stretch;
  min-height: clamp(12rem, 28vw, 16rem);
}

.hadith-slide {
  grid-area: 1 / 1;
  margin: 0;
  padding: clamp(2.25rem, 5vw, 3.25rem) clamp(1.75rem, 4.5vw, 3rem) clamp(2rem, 4vw, 2.75rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(1rem, 2.5vw, 1.35rem);
  position: relative;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate3d(0, 14px, 0) scale(0.985);
  transition:
    opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.65s;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.72) 100%);
  border: 1px solid rgba(var(--color-primary-rgb), 0.14);
  border-radius: clamp(1.25rem, 2.5vw, 1.75rem);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 24px 56px rgba(var(--color-primary-rgb), 0.1),
    0 8px 24px rgba(var(--color-primary-rgb), 0.06);
  backdrop-filter: blur(18px) saturate(1.35);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
}

.hadith-slide::before {
  content: '';
  position: absolute;
  inset-inline: clamp(1.75rem, 4.5vw, 3rem);
  top: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(var(--color-primary-rgb), 0.55) 20%,
    rgba(var(--color-primary-rgb), 0.85) 50%,
    rgba(var(--color-primary-rgb), 0.55) 80%,
    transparent
  );
  border-radius: 0 0 999px 999px;
  opacity: 0.75;
}

.hadith-slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

.hadith-slider.is-forward .hadith-slide.is-entering {
  --hadith-enter-x: 28px;
  animation: hadith-slide-in 0.72s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hadith-slider.is-back .hadith-slide.is-entering {
  --hadith-enter-x: -28px;
  animation: hadith-slide-in 0.72s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hadith-slider.is-forward .hadith-slide.is-leaving {
  --hadith-exit-x: -22px;
  animation: hadith-slide-out 0.55s cubic-bezier(0.4, 0, 0.2, 1) both;
  z-index: 0;
}

.hadith-slider.is-back .hadith-slide.is-leaving {
  --hadith-exit-x: 22px;
  animation: hadith-slide-out 0.55s cubic-bezier(0.4, 0, 0.2, 1) both;
  z-index: 0;
}

.hadith-slider.in .hadith-quote-mark {
  animation: hadith-quote-mark-in 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

.hadith-slide blockquote {
  margin: 0;
  padding-block-start: clamp(1.25rem, 3vw, 1.75rem);
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.8vw, 1.95rem);
  line-height: 1.55;
  font-weight: 600;
  color: var(--color-primary-dark);
  quotes: none;
  text-wrap: pretty;
}

.hadith-slide figcaption {
  margin: 0;
  padding-top: 0.35rem;
  color: var(--color-text-muted);
  font-style: normal;
  font-size: clamp(0.88rem, 1.6vw, 1rem);
  line-height: 1.5;
  letter-spacing: 0.02em;
  font-weight: 500;
}

.hadith-slide figcaption::before {
  content: '—';
  margin-inline-end: 0.45rem;
  color: rgba(var(--color-primary-rgb), 0.45);
}

.hadith-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  transform: translateY(-50%);
  width: clamp(2.75rem, 5vw, 3.25rem);
  height: clamp(2.75rem, 5vw, 3.25rem);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(var(--color-primary-rgb), 0.2);
  border-radius: 50%;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.78));
  color: var(--color-primary-dark);
  cursor: pointer;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 10px 28px rgba(var(--color-primary-rgb), 0.12);
  backdrop-filter: blur(10px);
  transition:
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.28s ease,
    border-color 0.28s ease,
    color 0.28s ease,
    box-shadow 0.28s ease;
}

.hadith-nav:hover,
.hadith-nav:focus-visible {
  transform: translateY(-50%) scale(1.08);
  background: linear-gradient(160deg, #fff, rgba(var(--color-primary-rgb), 0.08));
  border-color: rgba(var(--color-primary-rgb), 0.45);
  color: var(--color-primary);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 1) inset,
    0 14px 36px rgba(var(--color-primary-rgb), 0.18);
}

.hadith-nav:active {
  transform: translateY(-50%) scale(0.96);
}

.hadith-nav-prev {
  inset-inline-start: 0;
}

.hadith-nav-next {
  inset-inline-end: 0;
}

html[dir='rtl'] .hadith-nav svg {
  transform: scaleX(-1);
}

.hadith-slider-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.55rem;
  margin-top: clamp(1.35rem, 3vw, 1.85rem);
  position: relative;
  z-index: 1;
}

.hadith-dot {
  position: relative;
  width: 0.55rem;
  height: 0.55rem;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(var(--color-primary-rgb), 0.2);
  cursor: pointer;
  overflow: hidden;
  transition:
    width 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.25s ease,
    box-shadow 0.25s ease;
}

.hadith-dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--color-primary), rgba(var(--color-primary-rgb), 0.75));
  transform: scaleX(0);
  transform-origin: left center;
  opacity: 0;
}

html[dir='rtl'] .hadith-dot::after {
  transform-origin: right center;
}

.hadith-dot.is-active {
  width: 2.4rem;
  background: rgba(var(--color-primary-rgb), 0.14);
  box-shadow: 0 0 0 1px rgba(var(--color-primary-rgb), 0.12);
}

.hadith-dot.is-active::after {
  opacity: 1;
  animation: hadith-dot-progress var(--hadith-gap, 7000ms) linear forwards;
}

.hadith-dot:hover:not(.is-active) {
  background: rgba(var(--color-primary-rgb), 0.35);
  transform: scale(1.15);
}

.hadith-preview-note {
  margin: 0.85rem 0 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

@media (max-width: 640px) {
  .hadith-slider-stage {
    padding-inline: clamp(2.5rem, 10vw, 3rem);
  }

  .hadith-slide {
    padding-inline: clamp(1.35rem, 5vw, 1.75rem);
  }

  .hadith-nav {
    width: 2.5rem;
    height: 2.5rem;
  }

  .hadith-quote-mark {
    inset-inline-start: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hadith-band-glow,
  .hadith-decor-orb {
    animation: none;
  }

  .hadith-slide,
  .hadith-slider.is-forward .hadith-slide.is-entering,
  .hadith-slider.is-back .hadith-slide.is-entering,
  .hadith-slider.is-forward .hadith-slide.is-leaving,
  .hadith-slider.is-back .hadith-slide.is-leaving {
    animation: none;
    transition: opacity 0.2s ease;
    transform: none;
  }

  .hadith-dot.is-active::after {
    animation: none;
    transform: scaleX(1);
  }

  .hadith-nav:hover,
  .hadith-nav:focus-visible {
    transform: translateY(-50%);
  }
}

html[data-theme='dark'] .home-band-hadith {
  background: transparent;
  color: #e5e7eb;
}

html[data-theme='dark'] .hadith-band-glow--a {
  background: radial-gradient(circle, rgba(var(--color-primary-rgb), 0.22) 0%, transparent 68%);
}

html[data-theme='dark'] .hadith-band-glow--b {
  background: radial-gradient(circle, rgba(110, 231, 183, 0.12) 0%, transparent 70%);
}

html[data-theme='dark'] .hadith-title,
html[data-theme='dark'] .hadith-slide blockquote {
  color: #ecfdf5;
}

html[data-theme='dark'] .hadith-slide figcaption {
  color: rgba(229, 231, 235, 0.65);
}

html[data-theme='dark'] .hadith-slide {
  background:
    linear-gradient(145deg, rgba(15, 26, 21, 0.88) 0%, rgba(12, 22, 18, 0.72) 100%);
  border-color: rgba(110, 231, 183, 0.14);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 24px 56px rgba(0, 0, 0, 0.35);
}

html[data-theme='dark'] .hadith-quote-mark {
  color: rgba(110, 231, 183, 0.12);
}

html[data-theme='dark'] .hadith-nav {
  background:
    linear-gradient(160deg, rgba(22, 36, 30, 0.96), rgba(15, 26, 21, 0.88));
  border-color: rgba(110, 231, 183, 0.2);
  color: #ecfdf5;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

html[data-theme='dark'] .hadith-nav:hover,
html[data-theme='dark'] .hadith-nav:focus-visible {
  background: linear-gradient(160deg, rgba(28, 46, 38, 0.98), rgba(15, 26, 21, 0.92));
  color: #a7f3d0;
  border-color: rgba(110, 231, 183, 0.4);
}

html[data-theme='dark'] .hadith-decor-orb--lg {
  background:
    radial-gradient(
      circle at 40% 40%,
      rgba(var(--color-primary-rgb), 0.18) 0%,
      rgba(var(--color-primary-rgb), 0.06) 48%,
      transparent 74%
    );
}

html[data-theme='dark'] .hadith-decor-orb--sm {
  background:
    radial-gradient(
      circle at 50% 50%,
      rgba(var(--color-primary-rgb), 0.1) 0%,
      transparent 75%
    );
}

.home-card-grid {
  gap: 1.25rem;
  align-items: stretch;
}

.home-article {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 0;
  border-radius: 20px;
  background: var(--color-surface);
  box-shadow: var(--shadow-green);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.home-article:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.home-article-media {
  display: block;
  flex-shrink: 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--color-accent-soft);
}

.home-article-media .thumb,
.home-article-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.55s ease;
}

.home-article:hover .home-article-media .thumb,
.home-article:hover .home-article-media img {
  transform: scale(1.04);
}

.home-article > .body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 11.5rem;
  padding: 1rem 1.1rem 1.2rem;
}

.home-article .body .meta {
  flex-shrink: 0;
}

.home-article .body h3 {
  margin: 0.25rem 0 0.45rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.3rem * 1.35 * 2);
  line-height: 1.35;
}

.home-article .body h3 a {
  color: inherit;
  text-decoration: none;
}

.home-article .body > p {
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(0.95rem * 1.45 * 3);
  line-height: 1.45;
}

.home-article .read-more {
  margin-top: auto;
  padding-top: 0.85rem;
}

.gallery-river {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 1fr);
  gap: 0.85rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.gallery-river .gallery-tile {
  scroll-snap-align: start;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 4 / 5;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: var(--color-muted);
  box-shadow: var(--shadow-green);
  transition: box-shadow 0.3s ease;
}

.gallery-river .gallery-tile:hover {
  box-shadow: var(--shadow-hover);
}

.gallery-river .gallery-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-river .gallery-tile span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.5rem 0.85rem 0.75rem;
  background: linear-gradient(transparent, rgba(2, 44, 34, 0.75));
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  text-align: start;
}

.gallery-river .gallery-tile:hover img {
  transform: scale(1.05);
}

.timeline-rail {
  display: grid;
  gap: 0.85rem;
}

.timeline-pill {
  display: grid;
  gap: 0.35rem;
  padding: 1.15rem 1.25rem;
  border-radius: 16px;
  background: var(--color-surface);
  border: 1px solid rgba(var(--color-primary-rgb), 0.12);
  color: inherit;
  box-shadow: var(--shadow-green);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.timeline-pill:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  color: inherit;
}

.timeline-pill .meta {
  color: var(--color-primary);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.timeline-pill strong {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--color-primary);
}

.quote-block-soft:empty {
  display: none;
}

.cta-panel {
  display: grid;
  gap: clamp(1.75rem, 4vw, 4rem);
  padding: clamp(2rem, 5vw, 4.5rem);
  border-radius: 32px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 248, 0.96));
  border: 1px solid rgba(var(--color-primary-rgb), 0.08);
  box-shadow:
    0 22px 60px rgba(15, 23, 42, 0.08),
    0 6px 20px rgba(var(--color-primary-rgb), 0.06);
  align-items: center;
  overflow: hidden;
}

html[data-theme='dark'] .cta-panel {
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.92), rgba(12, 18, 29, 0.94));
}

.cta-panel-content {
  display: grid;
  gap: 1.5rem;
  align-content: center;
}

.cta-panel-copy h2 {
  margin: 0 0 0.65rem;
  color: var(--color-primary);
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.08;
}

.cta-panel-copy p {
  margin: 0;
  color: var(--color-text-muted);
  max-width: 42ch;
  font-size: clamp(1rem, 1.35vw, 1.08rem);
  line-height: 1.8;
}

.cta-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  align-items: center;
}

.cta-panel-visual {
  margin: 0;
  display: flex;
  justify-content: center;
}

.cta-panel-image-card {
  position: relative;
  width: min(100%, 27rem);
  border-radius: 28px;
  padding: 0.85rem;
  background: linear-gradient(180deg, rgba(243, 248, 244, 0.96), rgba(231, 240, 234, 0.92));
  border: 1px solid rgba(var(--color-primary-rgb), 0.1);
  box-shadow:
    0 18px 40px rgba(15, 23, 42, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.65) inset;
}

.cta-panel-image-card::before {
  content: '';
  position: absolute;
  inset: 1rem auto auto 1rem;
  width: 4rem;
  height: 4rem;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(var(--color-primary-rgb), 0.16), rgba(var(--color-primary-rgb), 0));
  pointer-events: none;
}

.cta-panel-image-card img {
  display: block;
  width: 100%;
  aspect-ratio: 5 / 6.4;
  object-fit: cover;
  object-position: 64% center;
  border-radius: 22px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

html[data-theme='dark'] .cta-panel-image-card {
  background: linear-gradient(180deg, rgba(28, 41, 36, 0.9), rgba(20, 31, 27, 0.94));
  border-color: rgba(148, 163, 184, 0.16);
}

@media (min-width: 900px) {
  .cta-panel {
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.82fr);
  }

  .cta-panel-visual {
    justify-content: flex-end;
  }
}

@media (max-width: 720px) {
  .cta-panel {
    padding: 1.6rem;
    border-radius: 24px;
  }

  .cta-panel-content {
    gap: 1.15rem;
  }

  .cta-panel-image-card {
    width: min(100%, 22rem);
    margin-inline: auto;
    padding: 0.7rem;
    border-radius: 24px;
  }

  .cta-panel-image-card img {
    border-radius: 18px;
  }
}

@media (min-width: 720px) {
  .topics-mosaic {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    grid-auto-flow: dense;
  }

  /* Portrait Character aligns to two landscape rows */
  
}

@media (min-width: 960px) {
  .topics-mosaic {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.35rem;
  }

  .home-card-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .timeline-rail {
    grid-template-columns: repeat(3, 1fr);
  }

  .gallery-river {
    grid-auto-columns: minmax(0, 1fr);
    grid-template-columns: repeat(4, 1fr);
    grid-auto-flow: dense;
    overflow: visible;
  }
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton {
  border-radius: 8px;
  background: linear-gradient(90deg, var(--color-muted) 25%, var(--color-border) 50%, var(--color-muted) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease infinite;
}

.skeleton-line {
  height: 0.85rem;
  margin-bottom: 0.55rem;
}

.skeleton-line.w40 { width: 40%; }
.skeleton-line.w50 { width: 50%; }
.skeleton-line.w60 { width: 60%; }
.skeleton-line.w70 { width: 70%; }
.skeleton-line.w80 { width: 80%; }
.skeleton-line.w90 { width: 90%; }

.skeleton-card,
.skeleton-preview {
  padding: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}

.skeleton-thumb,
.skeleton-preview-media {
  aspect-ratio: 16 / 10;
  border-radius: 0;
}

.skeleton-card .skeleton-line,
.skeleton-preview .skeleton-line {
  margin: 0.55rem 1rem;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.88rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.breadcrumbs .sep {
  opacity: 0.5;
}

.cred-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
}

.cred-badge {
  display: inline-flex;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

/* ——— Modern article reading layout ——— */
.reading-progress {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 1200;
  height: 3px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
  background: transparent;
}

.reading-progress.is-active {
  opacity: 1;
}

.reading-progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(
    90deg,
    var(--color-primary) 0%,
    #0a6b50 55%,
    var(--color-primary-dark) 100%
  );
  box-shadow: 0 0 10px rgba(var(--color-primary-rgb), 0.35);
  transition: width 0.08s linear;
}

.article-page {
  padding: 2rem 1.25rem 3.5rem;
  background: transparent;
}

.article-page.page-hero {
  background: transparent;
}

.article-page .article-layout {
  max-width: none;
  margin: 0;
  text-align: start;
}

.article-column {
  width: min(100%, 740px);
  margin-inline: auto;
  text-align: start;
}

.article-hero-block {
  margin-bottom: 0.35rem;
}

.article-title,
.article-hero-block h1,
.topic-reading-title {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.18;
  color: var(--color-primary);
}

.article-hero-block h1,
.article-title {
  margin: 0.15rem 0 0.85rem;
  font-size: clamp(2.05rem, 4.4vw, 2.85rem);
}

/* Hero cover — full-width crop inside reading column.
   z-index keeps photos above body::before atmosphere (z-index: 0)
   so the radial vignette does not sit in front of uploaded images. */
.article-cover-wrap,
.topic-reading-cover {
  margin: 1.65rem 0 1.85rem;
  overflow: hidden;
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow-green);
  position: relative;
  z-index: 3;
  background: var(--color-muted);
  width: 100%;
  aspect-ratio: 16 / 9;
}

.article-cover-wrap .article-cover,
.topic-reading-cover .article-cover {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  border-radius: 0;
  object-fit: cover;
  object-position: center 32%;
}

/* Mid-body second image — harmonious but distinct from cover */
.article-second-wrap {
  margin: 2.25rem 0 2.5rem;
  overflow: hidden;
  border-radius: calc(var(--radius) + 2px);
  box-shadow: var(--shadow-green);
  position: relative;
  z-index: 3;
  background: var(--color-muted);
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 10;
}

.article-body .article-second-wrap,
.topic-reading-body .article-second-wrap {
  display: block;
  margin: 2.75rem auto;
  clear: both;
  isolation: isolate;
}

/* Keep second image visually separate from highlighted quote cards */
.article-body .pull-quote + .article-second-wrap,
.article-body blockquote + .article-second-wrap,
.topic-reading-body .pull-quote + .article-second-wrap,
.topic-reading-body blockquote + .article-second-wrap {
  margin-top: 3.25rem;
}

.article-body .article-second-wrap + .pull-quote,
.article-body .article-second-wrap + blockquote,
.topic-reading-body .article-second-wrap + .pull-quote,
.topic-reading-body .article-second-wrap + blockquote {
  margin-top: 3.25rem;
}

.article-second-wrap .article-second {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  border-radius: 0;
  object-fit: cover;
  object-position: center center;
}

.article-summary {
  font-size: clamp(1.08rem, 2.1vw, 1.22rem);
  line-height: 1.65;
  color: var(--color-text-muted);
  margin: 0 0 1.15rem;
  max-width: 38rem;
}

.article-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  padding: 0.95rem 0 0.15rem;
  border-top: 1px solid rgba(var(--color-primary-rgb), 0.12);
  margin-top: 0.35rem;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.15rem;
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.92rem;
  text-align: start;
}

.article-meta-dot {
  margin-inline: 0.45rem;
  opacity: 0.55;
}

.article-meta-author {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--color-text);
  font-weight: 600;
}

.article-author-pencil {
  flex-shrink: 0;
  opacity: 0.72;
  color: var(--color-primary);
}

.article-meta-author-name {
  font-weight: 600;
}

.article-meta-author-link {
  font-weight: 600;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--color-primary) 35%, transparent);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.article-meta-author-link:hover,
.article-meta-author-link:focus-visible {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.author-page .author-articles-grid {
  margin-top: 1.5rem;
}

.author-page .author-card-type {
  margin-inline-start: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-primary);
}

.article-body {
  font-size: 1.085rem;
  line-height: 1.82;
  letter-spacing: 0.005em;
}

.article-body > *:first-child {
  margin-top: 0;
}

.article-body h2,
.article-body h3,
.article-body .article-subhead {
  display: block;
  font-family: var(--font-display), var(--font-body);
  font-weight: 700 !important;
  color: var(--color-primary) !important;
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

.article-body h2,
.article-body h2.article-subhead {
  margin: 1.15rem 0 0.45rem;
  font-size: clamp(1.4rem, 2.5vw, 1.7rem);
  line-height: 1.25;
}

.article-body h3,
.article-body h3.article-subhead {
  margin: 0.95rem 0 0.35rem;
  font-size: clamp(1.15rem, 2vw, 1.3rem);
  line-height: 1.3;
  font-weight: 700 !important;
}

html[data-theme='dark'] .article-body h2,
html[data-theme='dark'] .article-body h3,
html[data-theme='dark'] .article-body .article-subhead {
  color: #6ee7b7 !important;
}

.article-body blockquote,
.article-body q {
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.article-toc {
  margin: 1.65rem 0 1.85rem;
  padding: 1.1rem 1.2rem;
  border: 1px solid rgba(var(--color-primary-rgb), 0.14);
  border-radius: var(--radius-sm);
  background:
    linear-gradient(160deg, rgba(var(--color-primary-rgb), 0.06), transparent 55%),
    var(--color-surface);
  box-shadow: 0 4px 16px rgba(var(--color-primary-rgb), 0.08);
}

.article-toc .toc-title {
  margin: 0 0 0.65rem;
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-primary);
}

.article-toc ol {
  margin: 0;
  padding-inline-start: 1.2rem;
}

.article-toc li {
  margin: 0.4rem 0;
}

.article-toc a {
  color: var(--color-text);
  text-decoration: none;
}

.article-toc a:hover {
  color: var(--color-primary);
}

.article-toc .toc-h3 {
  list-style-type: circle;
  margin-inline-start: 0.75rem;
}

.article-sources {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.share-row {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  justify-content: flex-start;
  margin: 0;
}

.article-section-head {
  margin: 0 0 1.1rem;
}

.article-section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.5vw, 1.7rem);
  color: var(--color-primary);
  letter-spacing: -0.01em;
}

.article-related,
.article-comments {
  margin-top: 2.75rem;
  padding-top: 2.15rem;
  border-top: 1px solid rgba(var(--color-primary-rgb), 0.12);
}

/* Compact related list — overrides .section padding inside the article column */
.article-related.section {
  margin-top: 1.75rem;
  padding: 1.25rem 0 0;
  background: transparent;
}

.article-related .article-section-head {
  margin-bottom: 0.7rem;
}

.article-related .article-section-head h2 {
  font-size: clamp(1.12rem, 2vw, 1.3rem);
}

.article-related-list {
  list-style: none;
  margin: 0;
  padding: 0.2rem;
  border: 1px solid rgba(var(--color-primary-rgb), 0.12);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  box-shadow: 0 2px 10px rgba(var(--color-primary-rgb), 0.06);
}

.article-related-list > li + li {
  border-top: 1px solid rgba(var(--color-primary-rgb), 0.08);
}

.article-related-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.55rem;
  border-radius: calc(var(--radius-sm) - 2px);
  text-decoration: none;
  color: inherit;
  transition: background-color var(--transition);
}

.article-related-link:hover,
.article-related-link:focus-visible {
  background: rgba(var(--color-primary-rgb), 0.06);
}

.article-related-thumb {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 8px;
  overflow: hidden;
  background: var(--color-accent-soft);
}

.article-related-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-related-fallback {
  display: block;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(
      135deg,
      rgba(var(--color-primary-rgb), 0.22),
      rgba(var(--color-primary-rgb), 0.08)
    );
}

.article-related-copy {
  min-width: 0;
  display: grid;
  gap: 0.12rem;
}

.article-related-title {
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.7vw, 1.12rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.article-related-link:hover .article-related-title,
.article-related-link:focus-visible .article-related-title {
  color: var(--color-primary);
}

.article-related-meta {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-text-muted);
  letter-spacing: 0.01em;
}

@media (max-width: 480px) {
  .article-related-link {
    gap: 0.65rem;
    padding: 0.5rem 0.4rem;
  }

  .article-related-thumb {
    width: 2.4rem;
    height: 2.4rem;
  }
}

.article-comments-panel {
  padding: 1.15rem 1.2rem 1.25rem;
  border: 1px solid rgba(var(--color-primary-rgb), 0.12);
  border-radius: var(--radius);
  background: var(--color-surface);
  box-shadow: var(--shadow-green);
}

.comment-login-prompt {
  margin: 0.75rem 0 0;
}

.back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1100;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: none;
  background: var(--color-primary);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: var(--shadow-hover);
  transition: transform var(--transition), opacity var(--transition);
}

.back-to-top:hover {
  transform: translateY(-2px);
}

.footer-newsletter {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  grid-column: 1 / -1;
}

.newsletter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
  align-items: center;
}

.newsletter-form input[type='email'] {
  flex: 1 1 200px;
  min-width: 0;
  padding: 0.65rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.newsletter-form input[type='email']::placeholder {
  color: rgba(255, 255, 255, 0.65);
}

.newsletter-consent {
  flex: 1 1 100%;
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  font-size: 0.85rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.85);
  margin: 0.15rem 0 0;
}

.newsletter-consent input {
  margin-top: 0.2rem;
  flex: 0 0 auto;
}

.newsletter-consent a {
  color: #a7f3d0;
  text-decoration: underline;
}

.newsletter-msg {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
}

.newsletter-msg.success {
  color: #a7f3d0;
}

.newsletter-msg.error {
  color: #fecaca;
}

.locale-stub-banner {
  margin: 1rem 0 1.25rem;
  padding: 0.95rem 1.15rem;
  border: 1px solid rgba(var(--color-primary-rgb), 0.16);
  background:
    linear-gradient(135deg, rgba(var(--color-primary-rgb), 0.08), rgba(var(--color-primary-rgb), 0.03)),
    var(--color-surface);
  border-radius: var(--radius-sm);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 14px rgba(var(--color-primary-rgb), 0.08);
}

.locale-stub-banner p {
  margin: 0;
  flex: 1 1 220px;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--color-text-muted, #3d5248);
}

.legal-page .legal-updated {
  color: var(--color-text-muted, #5a6b62);
  font-size: 0.9rem;
  margin-top: -0.35rem;
}

.legal-copy h2 {
  margin-top: 1.5rem;
  font-size: 1.15rem;
}

.legal-copy ul {
  padding-inline-start: 1.25rem;
}

.submit-preview {
  margin-top: 0.75rem;
  padding: 1rem;
  border: 1px dashed var(--color-border, rgba(15, 60, 45, 0.25));
  border-radius: 0.5rem;
  min-height: 4rem;
  background: var(--color-surface-muted, rgba(15, 80, 55, 0.04));
}

.submit-preview:empty::before {
  content: attr(data-empty);
  color: var(--color-text-muted, #6b7c74);
  font-size: 0.9rem;
}

.form-hint {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: var(--color-text-muted, #5a6b62);
  line-height: 1.4;
}

.gallery-tile,
.gallery-item-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  font: inherit;
  text-align: inherit;
  color: inherit;
}

.gallery-item-btn {
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.88);
}

.lightbox-figure {
  margin: 0;
  max-width: min(960px, 100%);
  max-height: 85vh;
}

.lightbox-img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.lightbox-caption {
  color: #fff;
  margin-top: 0.75rem;
  text-align: center;
}

.lightbox-caption p {
  margin: 0.35rem 0 0;
  opacity: 0.85;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1.5rem;
  line-height: 1;
}

.lightbox-close {
  top: 1rem;
  right: 1rem;
}

.lightbox-prev {
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

body.lightbox-open {
  overflow: hidden;
}

.timeline-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 1.25rem 0 1.75rem;
  padding: 0.85rem 1rem;
  background: var(--color-muted);
  border-radius: var(--radius-sm);
  position: sticky;
  top: calc(var(--header-h) + 0.5rem);
  z-index: 10;
}

.timeline-toolbar-label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.timeline-era-btn {
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
}

.timeline-era-btn.is-active,
.timeline-era-btn:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.timeline-interactive {
  border-inline-start: 3px solid var(--color-primary-soft);
  padding-inline-start: 0.5rem;
}

.timeline-era {
  margin-bottom: 2rem;
}

.timeline-era-title {
  color: var(--color-primary);
  margin: 0 0 1rem 0.5rem;
}

.timeline-item-interactive {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  margin: 0 0 1.25rem 0.5rem;
  padding: 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-green);
  transition: box-shadow 0.25s ease;
}

.timeline-item-interactive:hover {
  box-shadow: var(--shadow-hover);
}

.timeline-dot {
  width: 12px;
  height: 12px;
  margin-top: 0.35rem;
  border-radius: 50%;
  background: var(--color-primary);
}

.timeline-item-body h3 {
  margin: 0.25rem 0;
}

.timeline-item-body p {
  margin: 0;
  color: var(--color-text-muted);
}

@media (min-width: 768px) {
  .start-path {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media print {
  .site-header,
  .site-footer,
  .site-sidebar,
  .sidebar-backdrop,
  .back-to-top,
  .share-row,
  .article-toc,
  .reading-progress,
  .continue-reading-bar,
  .article-related,
  .article-comments,
  #related {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .article-layout {
    max-width: none;
  }

  a[href]::after {
    content: ' (' attr(href) ')';
    font-size: 0.8em;
  }
}

.hero-featured-copy {
  transition: opacity 0.35s ease, transform 0.45s ease;
}

.hero-featured-copy.is-leaving {
  opacity: 0;
  transform: translateY(12px);
}

.hero-featured-copy.is-entering {
  animation: hero-copy-in 0.45s ease forwards;
}

@keyframes hero-copy-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-copy-body p {
  margin: 0;
  max-width: 100%;
  width: 100%;
  color: var(--color-text);
  font-size: 1.05rem;
  line-height: 1.7;
  text-align: inherit;
}

.hero-copy-body p:last-child {
  margin-bottom: 0;
}

html[data-theme='dark'] .hero-copy-body p {
  color: var(--color-text-muted);
}

/* ——— Hero text slider (dots under copy; no image column) ——— */
.hero-text-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0.45rem;
  margin-top: 1.15rem;
  min-height: 0.7rem;
}

.hero-text-dots[hidden] {
  display: none !important;
}

.hero-dot {
  width: 0.45rem;
  height: 0.45rem;
  min-width: 0.45rem;
  min-height: 0.45rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(var(--color-primary-rgb), 0.28);
  cursor: pointer;
  transition: background 0.2s ease, width 0.2s ease;
}

.hero-dot.is-active {
  background: var(--color-primary);
  width: 1.2rem;
  border-radius: 999px;
}

@media (pointer: coarse) {
  .hero-dot {
    min-width: 44px;
    min-height: 44px;
    width: 44px;
    height: 44px;
    background: transparent;
    position: relative;
  }

  .hero-dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0.45rem;
    height: 0.45rem;
    margin: -0.225rem 0 0 -0.225rem;
    border-radius: 50%;
    background: rgba(var(--color-primary-rgb), 0.28);
  }

  .hero-dot.is-active {
    width: 44px;
  }

  .hero-dot.is-active::after {
    width: 1.2rem;
    margin-left: -0.6rem;
    border-radius: 999px;
    background: var(--color-primary);
  }
}

/* ——— Featured story block ——— */
.featured-story {
  display: grid;
  gap: 0;
  overflow: hidden;
  border-radius: 24px;
  background: var(--color-surface);
  border: 1px solid rgba(var(--color-primary-rgb), 0.1);
  box-shadow: var(--shadow-green);
  color: inherit;
  text-decoration: none;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.featured-story:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  color: inherit;
}

.featured-story-media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--color-muted);
}

.featured-story-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.featured-story:hover .featured-story-media img {
  transform: scale(1.04);
}

.featured-story-copy {
  padding: 1.5rem 1.35rem 1.6rem;
  text-align: start;
}

.featured-story-copy h3 {
  margin: 0.35rem 0 0.65rem;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  color: var(--color-primary);
}

.featured-story-copy p {
  margin: 0;
  color: var(--color-text-muted);
}

@media (min-width: 860px) {
  .featured-story {
    grid-template-columns: 1.15fr 1fr;
    align-items: stretch;
    min-height: 320px;
  }

  .featured-story-media {
    aspect-ratio: auto;
    min-height: 100%;
  }
}

/* ——— Topic page: banner, inline readings, next path ——— */
/* ——— Category overview browse (compact named cards; not homepage tiles) ——— */
.category-page {
  padding: 1.75rem 1rem 3rem;
}

.category-column {
  width: min(100%, 68rem);
  margin-inline: auto;
  text-align: start;
}

.category-header {
  margin: 0 0 1.5rem;
}

.category-header h1 {
  margin: 0 0 0.5rem;
  color: var(--color-primary);
  font-size: clamp(1.85rem, 4vw, 2.45rem);
  text-align: start;
}

.category-desc {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 1.02rem;
  max-width: 40rem;
}

.category-page .section-head {
  margin: 1.75rem 0 0.85rem;
}

.category-page .section-head:first-of-type {
  margin-top: 0.35rem;
}

.category-browse-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
}

@keyframes category-browse-card-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.category-browse-grid .category-browse-card {
  opacity: 0;
}

.category-browse-grid.is-visible .category-browse-card {
  animation: category-browse-card-in 0.52s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: min(calc(var(--i, 0) * 0.065s), 0.78s);
}

.category-browse-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(var(--color-primary-rgb), 0.1);
  border-radius: 12px;
  background: var(--color-surface);
  color: inherit;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(var(--color-primary-rgb), 0.04);
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    transform 0.22s ease,
    box-shadow 0.22s ease;
}

.category-browse-card:hover {
  border-color: rgba(var(--color-primary-rgb), 0.22);
  background: var(--color-surface);
  color: inherit;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(var(--color-primary-rgb), 0.1);
}

.category-browse-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  min-height: 8.5rem;
  overflow: hidden;
  background: var(--color-muted);
  flex-shrink: 0;
}

.category-browse-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.category-browse-card:hover .category-browse-thumb img {
  transform: scale(1.04);
}

.category-browse-fallback {
  display: block;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(
      135deg,
      rgba(var(--color-primary-rgb), 0.28),
      rgba(var(--color-primary-rgb), 0.12)
    ),
    url('/assets/img/green-dome-home.png') center/cover;
}

.category-browse-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.2rem;
  min-width: 0;
  min-height: 0;
  padding: 0.7rem 0.9rem 0.75rem;
  flex: 1;
}

.category-browse-meta {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.category-browse-title {
  font-family: var(--font-body);
  font-size: clamp(0.92rem, 1.5vw, 1.05rem);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--color-primary-dark);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.category-browse-card:hover .category-browse-title {
  color: var(--color-primary);
}

.category-browse-desc {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--color-text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (min-width: 520px) {
  .category-browse-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
  }
}

@media (min-width: 720px) {
  .category-browse-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.95rem;
  }
}

@media (min-width: 1000px) {
  .category-browse-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .category-browse-grid {
    gap: 0.7rem;
  }

  .category-browse-text {
    padding: 0.65rem 0.8rem 0.7rem;
  }

  .category-browse-title {
    font-size: 0.92rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .category-browse-grid .category-browse-card {
    opacity: 1;
    animation: none;
    transform: none;
  }

  .category-browse-card,
  .category-browse-thumb img {
    transition: none;
  }

  .category-browse-card:hover {
    transform: none;
  }

  .category-browse-card:hover .category-browse-thumb img {
    transform: none;
  }
}

/* (duplicate category-browse overrides removed — single vertical card grid) */

.topic-page {
  padding: 1.75rem 1rem 3rem;
}

.topic-column {
  width: min(100%, 740px);
  margin-inline: auto;
  text-align: start;
}

.topic-header {
  margin: 0 0 1.75rem;
  padding: 0;
  background: none;
  border: 0;
  text-align: start;
}

.topic-banner,
.topic-banner-plain {
  background: none;
  border: 0;
  color: var(--color-text);
  margin: 0;
  padding: 0;
}

.topic-banner-bg {
  display: none;
}

.topic-banner-inner {
  position: static;
}

.topic-header .eyebrow,
.topic-banner .eyebrow {
  color: var(--color-primary);
  margin: 0 0 0.45rem;
}

.topic-header h1,
.topic-banner h1 {
  margin: 0 0 0.65rem;
  color: var(--color-primary);
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  text-align: start;
}

.topic-banner-desc {
  margin: 0;
  max-width: none;
  color: var(--color-text-muted);
  font-size: 1.02rem;
  text-align: start;
}

.topic-layout {
  max-width: none;
  width: 100%;
  margin: 0;
  text-align: start;
}

.topic-reading,
.topic-reading-head,
.topic-reading-title,
.topic-reading-body {
  text-align: start;
}

.topic-jump {
  margin-bottom: 2rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-muted);
}

.topic-jump ol {
  margin: 0.5rem 0 0;
  padding-inline-start: 1.2rem;
}

.topic-jump li {
  margin: 0.35rem 0;
}

.topic-reading {
  margin-bottom: 3.25rem;
  padding-bottom: 2.75rem;
  border-bottom: 1px solid rgba(var(--color-primary-rgb), 0.12);
}

.topic-reading:last-of-type,
.topic-reading-solo {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.topic-reading-title {
  margin: 0.35rem 0 0.65rem;
  font-size: clamp(1.75rem, 3.5vw, 2.45rem);
}

.topic-reading .article-meta {
  margin-bottom: 0.85rem;
}

.topic-path-card {
  margin-top: 1rem;
  padding: 1.35rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background: linear-gradient(135deg, var(--color-accent-soft), var(--color-surface));
  box-shadow: var(--shadow-green);
}

.topic-path-links {
  display: grid;
  gap: 0.85rem;
  margin-top: 0.85rem;
}

@media (min-width: 640px) {
  .topic-path-links {
    grid-template-columns: 1fr 1fr;
  }
}

.topic-path-link {
  display: grid;
  gap: 0.2rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: inherit;
  box-shadow: var(--shadow-green);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.topic-path-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  color: inherit;
}

.topic-path-link span {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-primary);
}

.topic-path-link.next {
  text-align: end;
}

/* ——— Richer article / reading design ——— */
.article-body .pull-quote,
.topic-reading-body .pull-quote {
  margin: 2rem 0;
  padding: 1.35rem 1.45rem;
  border: none;
  border-inline-start: 4px solid var(--color-primary);
  border-inline-end: 0;
  border-radius: var(--radius-sm);
  background:
    linear-gradient(135deg, rgba(var(--color-primary-rgb), 0.1), rgba(var(--color-primary-rgb), 0.04)),
    var(--color-surface);
  box-shadow:
    0 4px 14px rgba(var(--color-primary-rgb), 0.12),
    0 14px 36px rgba(var(--color-primary-rgb), 0.18);
  font-family: var(--font-display);
  font-size: clamp(1.22rem, 2.5vw, 1.5rem);
  line-height: 1.52;
  color: var(--color-primary-dark);
}

.sources-panel {
  margin-top: 2.35rem;
  padding: 1.3rem 1.4rem;
  border-radius: var(--radius);
  border: 1px solid rgba(var(--color-primary-rgb), 0.14);
  background:
    linear-gradient(160deg, rgba(var(--color-primary-rgb), 0.05), transparent 50%),
    var(--color-surface);
  box-shadow: 0 4px 16px rgba(var(--color-primary-rgb), 0.08);
}

.sources-panel h2,
.sources-panel h3 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--color-primary);
}

.sources-panel ul {
  margin: 0;
  padding-inline-start: 1.15rem;
}

.sources-panel li {
  margin: 0.4rem 0;
  color: var(--color-text-muted);
}

.article-body p {
  margin: 0 0 1.25rem;
}

.article-body p + p {
  margin-top: 0;
}

.topic-reading-body p {
  margin: 0 0 1.25rem;
}

.article-body img:not(.article-second),
.topic-reading-body img:not(.article-second) {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 1.75rem auto;
  border-radius: var(--radius-sm);
  object-fit: cover;
  box-shadow: 0 4px 16px rgba(var(--color-primary-rgb), 0.1);
}

.continue-reading-bar {
  margin: 0.85rem 0 1.15rem;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(var(--color-primary-rgb), 0.16);
  background: rgba(var(--color-primary-rgb), 0.06);
  box-shadow: 0 4px 14px rgba(var(--color-primary-rgb), 0.08);
}

.category-readings {
  display: block;
  width: 100%;
}

.category-readings .topic-reading-more {
  margin: 1.25rem 0 0;
}

.category-browse-date {
  display: block;
  margin-top: 0;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0;
  text-transform: none;
  color: var(--color-text-muted);
  min-height: 1.2em;
}

.category-browse-date--empty {
  visibility: hidden;
}

.site-footer-slim .footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  padding: 1rem 0;
}

.site-footer-slim .footer-bottom .container {
  width: min(100% - 2rem, 740px);
  margin-inline: auto;
}

.site-footer-slim .footer-copy {
  margin: 0;
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.92;
}

.site-footer-slim .footer-cta,
.site-footer-slim .footer-newsletter,
.site-footer-slim .footer-grid,
.site-footer-slim .footer-inner {
  display: none;
}

/* ——— Content pages: slim top bar + left sidebar ——— */
body.has-sidebar {
  --sidebar-w: 280px;
  --header-h: 64px;
  --nav-rail-bg: #064e3b;
}

body.has-sidebar .site-header-slim {
  background: transparent;
  border-bottom: 0;
  box-shadow: none;
}

body.has-sidebar .site-header-slim .header-inner-slim {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  align-items: stretch;
  width: 100%;
  max-width: none;
  min-height: var(--header-h);
  gap: 0;
  margin: 0;
  padding: 0;
}

body.has-sidebar .site-header-slim .nav-desktop,
body.has-sidebar .site-header-slim .mobile-nav {
  display: none !important;
}

body.has-sidebar .header-brand-rail {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0 1.15rem;
  background: var(--nav-rail-bg);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

body.has-sidebar .header-brand-rail .brand {
  color: #fff;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}

body.has-sidebar .header-brand-rail .brand .brand-tld {
  color: rgba(255, 255, 255, 0.7);
}

body.has-sidebar .header-brand-rail .sidebar-toggle {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

body.has-sidebar .header-brand-rail .sidebar-toggle:hover,
body.has-sidebar .header-brand-rail .sidebar-toggle:focus-visible,
body.has-sidebar .header-brand-rail .sidebar-toggle[aria-expanded='true'] {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
}

body.has-sidebar .header-brand-rail .hamburger span {
  background: #fff;
}

body.has-sidebar .header-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 1.35rem;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(6, 78, 59, 0.1);
}

html[data-theme='dark'] body.has-sidebar .header-toolbar {
  background: rgba(15, 23, 42, 0.94);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

body.has-sidebar .header-toolbar .header-actions {
  margin-left: 0;
  gap: 0.4rem;
}

body.has-sidebar .header-toolbar .locale-trigger {
  border-color: rgba(6, 78, 59, 0.16);
  background: #fff;
}

html[data-theme='dark'] body.has-sidebar .header-toolbar .locale-trigger {
  background: var(--color-muted);
  border-color: var(--color-border);
}

body.has-sidebar .header-toolbar .icon-btn.header-icon-btn {
  border-radius: 10px;
  border-color: rgba(6, 78, 59, 0.16);
}

.site-sidebar {
  position: fixed;
  top: var(--header-h);
  left: 0;
  bottom: 0;
  width: var(--sidebar-w, 280px);
  z-index: 900;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 120px),
    var(--nav-rail-bg, #064e3b);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  overflow-y: auto;
  transform: translateX(-105%);
  transition: transform 0.25s ease;
  padding: 0 0 2rem;
  color: #fff;
}

.sidebar-resizer {
  position: absolute;
  top: 0;
  right: 0;
  width: 8px;
  height: 100%;
  z-index: 40;
  cursor: col-resize;
  touch-action: none;
  background: transparent;
}

.sidebar-resizer:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.35);
  outline-offset: -2px;
}

body.is-sidebar-resizing {
  cursor: col-resize !important;
  user-select: none !important;
}

body.is-sidebar-resizing iframe,
body.is-sidebar-resizing .admin-main,
body.is-sidebar-resizing main {
  pointer-events: none !important;
}

body.is-sidebar-resizing .site-sidebar,
body.is-sidebar-resizing .admin-sidebar,
body.is-sidebar-resizing .header-brand-rail,
body.is-sidebar-resizing .header-inner-slim {
  transition: none !important;
}

@media (max-width: 1023px) {
  .admin-sidebar > .sidebar-resizer {
    display: none;
  }
}

body.has-sidebar.sidebar-open .site-sidebar,
body.has-sidebar .site-sidebar.is-open {
  transform: translateX(0);
  box-shadow: 16px 0 40px rgba(2, 44, 34, 0.28);
}

/* Arabic / RTL: topics rail on the right */
html[dir='rtl'] body.has-sidebar .site-header-slim .header-inner-slim {
  grid-template-columns: 1fr var(--sidebar-w);
}

html[dir='rtl'] body.has-sidebar .header-brand-rail {
  grid-column: 2;
  border-right: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
}

html[dir='rtl'] body.has-sidebar .header-toolbar {
  grid-column: 1;
  justify-content: flex-end;
}

html[dir='rtl'] .site-sidebar {
  left: auto;
  right: 0;
  border-right: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  transform: translateX(105%);
}

html[dir='rtl'] body.has-sidebar.sidebar-open .site-sidebar,
html[dir='rtl'] body.has-sidebar .site-sidebar.is-open {
  transform: translateX(0);
  box-shadow: -16px 0 40px rgba(2, 44, 34, 0.28);
}

html[dir='rtl'] .sidebar-resizer {
  right: auto;
  left: 0;
}

html[dir='rtl'] .sidebar-link.is-active,
html[dir='rtl'] .sidebar-sublink.is-active {
  box-shadow: inset -3px 0 0 #fff;
}

html[dir='rtl'] .sidebar-sublink {
  padding-inline-start: 1.15rem;
  padding-inline-end: 0.75rem;
}

/* Arabic / RTL reading polish */
html[dir='rtl'] {
  --font-display: 'IBM Plex Sans Arabic', 'Cormorant Garamond', Georgia, serif;
  --font-body: 'IBM Plex Sans Arabic', 'Source Sans 3', system-ui, sans-serif;
}

html[dir='rtl'] .article-body,
html[dir='rtl'] .topic-reading-body {
  line-height: 1.85;
  letter-spacing: normal;
}

html[dir='rtl'] .article-body h2,
html[dir='rtl'] .article-body h3,
html[dir='rtl'] .topic-reading-title,
html[dir='rtl'] .topic-header h1,
html[dir='rtl'] .topic-banner h1 {
  line-height: 1.35;
  letter-spacing: normal;
}

html[dir='rtl'] .hero-featured-copy,
html[dir='rtl'] .hero-copy-body,
html[dir='rtl'] .featured-story-copy {
  text-align: start;
}

html[dir='rtl'] .share-row {
  justify-content: flex-start;
}

html[dir='rtl'] .article-meta {
  text-align: start;
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  top: var(--header-h);
  z-index: 850;
  background: rgba(2, 44, 34, 0.45);
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.05rem 1.1rem 0.85rem;
  position: sticky;
  top: 0;
  background: transparent;
  z-index: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-title {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

.sidebar-close {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.sidebar-close:hover {
  background: rgba(255, 255, 255, 0.18);
}

.sidebar-nav {
  padding: 0.85rem 0.75rem;
  display: grid;
  gap: 0.18rem;
}

.sidebar-link,
.sidebar-sublink {
  display: block;
  padding: 0.58rem 0.8rem;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.92rem;
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease;
}

.sidebar-link:hover,
.sidebar-sublink:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.sidebar-link.is-active,
.sidebar-sublink.is-active {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-weight: 700;
  box-shadow: inset 3px 0 0 #fff;
}

.sidebar-group {
  margin: 0.15rem 0;
}

.sidebar-group-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.62rem 0.8rem;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  font: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  text-align: start;
}

.sidebar-group-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.sidebar-chevron {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.55;
  transition: transform 0.2s ease;
}

.sidebar-group.is-open .sidebar-chevron {
  transform: rotate(180deg);
}

.sidebar-group-panel {
  display: none;
  padding: 0.2rem 0 0.4rem;
}

.sidebar-group.is-open .sidebar-group-panel {
  display: grid;
  gap: 0.1rem;
}

.sidebar-sublink {
  font-size: 0.86rem;
  font-weight: 500;
  padding: 0.48rem 0.75rem;
  padding-inline-start: 1.15rem;
}

@media (min-width: 1024px) {
  body.has-sidebar .site-sidebar {
    transform: none;
    box-shadow: none;
    z-index: 950;
  }

  body.has-sidebar .sidebar-close,
  body.has-sidebar .sidebar-toggle {
    display: none;
  }

  body.has-sidebar .sidebar-backdrop {
    display: none !important;
  }

  body.has-sidebar main,
  body.has-sidebar .category-page,
  body.has-sidebar .topic-page,
  body.has-sidebar .article-page {
    margin-left: var(--sidebar-w);
    width: calc(100% - var(--sidebar-w));
    box-sizing: border-box;
    max-width: none;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  /* Footer stays in the content column — never under the green rail */
  body.has-sidebar .site-footer {
    margin-left: var(--sidebar-w);
    width: calc(100% - var(--sidebar-w));
    box-sizing: border-box;
    background: #f3f6f4;
    color: var(--color-text);
    border-top: 1px solid rgba(6, 78, 59, 0.12);
  }

  body.has-sidebar .site-footer .footer-inner,
  body.has-sidebar .site-footer .footer-bottom,
  body.has-sidebar .site-footer .footer-bottom .container {
    margin-left: 0;
    width: auto;
    max-width: none;
  }

  body.has-sidebar .site-footer .footer-inner {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  body.has-sidebar .site-footer .footer-logo,
  body.has-sidebar .site-footer .footer-heading,
  body.has-sidebar .site-footer .footer-cta-link {
    color: var(--color-primary);
  }

  body.has-sidebar .site-footer .footer-blurb,
  body.has-sidebar .site-footer .footer-meta,
  body.has-sidebar .site-footer .footer-cta-text,
  body.has-sidebar .site-footer .footer-copy {
    color: var(--color-text-muted);
    opacity: 1;
  }

  body.has-sidebar .site-footer .footer-links a,
  body.has-sidebar .site-footer .footer-contact a {
    color: var(--color-text);
  }

  body.has-sidebar .site-footer .footer-links a:hover,
  body.has-sidebar .site-footer .footer-contact a:hover,
  body.has-sidebar .site-footer .footer-cta-link:hover,
  body.has-sidebar .site-footer .footer-logo:hover {
    color: var(--color-primary-dark);
  }

  body.has-sidebar .site-footer .footer-bottom {
    border-top-color: rgba(6, 78, 59, 0.12);
    background: transparent;
  }

  body.has-sidebar .site-footer .footer-cta {
    border-top-color: rgba(6, 78, 59, 0.12);
  }

  body.has-sidebar .site-footer-slim .footer-bottom .container {
    width: min(100% - 2rem, 740px);
    margin-inline: auto;
  }

  body.has-sidebar .topic-column,
  body.has-sidebar .article-column {
    margin-left: auto;
    margin-right: auto;
    width: min(100%, 740px);
  }

  html[dir='rtl'] body.has-sidebar .site-sidebar {
    left: auto;
    right: 0;
    transform: none;
  }

  html[dir='rtl'] body.has-sidebar main,
  html[dir='rtl'] body.has-sidebar .category-page,
  html[dir='rtl'] body.has-sidebar .topic-page,
  html[dir='rtl'] body.has-sidebar .article-page {
    margin-left: 0;
    margin-right: var(--sidebar-w);
  }

  html[dir='rtl'] body.has-sidebar .site-footer {
    margin-left: 0;
    margin-right: var(--sidebar-w);
  }
}

/* ——— Global mobile responsiveness ——— */
html {
  -webkit-text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
}

img,
video,
iframe,
svg {
  max-width: 100%;
  height: auto;
}

.article-cover-wrap .article-cover,
.topic-reading-cover .article-cover,
.article-second-wrap .article-second {
  height: 100%;
  max-width: none;
}

.article-body img,
.topic-reading-body img,
.article-body table,
.topic-reading-body table {
  max-width: 100%;
}

.article-body table,
.topic-reading-body table {
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
}

.article-body pre,
.topic-reading-body pre {
  overflow-x: auto;
  max-width: 100%;
}

input,
select,
textarea {
  max-width: 100%;
  font-size: 16px; /* prevents iOS zoom on focus */
}

button {
  max-width: 100%;
}

.btn {
  max-width: 100%;
}

body.sidebar-open {
  overflow: hidden;
}

.site-sidebar {
  width: min(var(--sidebar-w, 280px), 86vw);
  -webkit-overflow-scrolling: touch;
}

.sidebar-toggle .hamburger {
  pointer-events: none;
}

@media (max-width: 1023px) {
  body.has-sidebar .category-page,
  body.has-sidebar .topic-page,
  body.has-sidebar .article-page,
  body.has-sidebar main,
  body.has-sidebar .site-footer .footer-inner,
  body.has-sidebar .site-footer .footer-bottom,
  body.has-sidebar .site-footer .footer-bottom .container,
  body.has-sidebar .site-footer-slim .footer-bottom {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    max-width: 100%;
  }

  body.has-sidebar .site-header-slim .header-inner-slim {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 0;
    background: var(--nav-rail-bg);
    min-height: var(--header-h);
  }

  html[dir='rtl'] body.has-sidebar .header-brand-rail,
  html[dir='rtl'] body.has-sidebar .header-toolbar {
    grid-column: auto;
  }

  body.has-sidebar .header-brand-rail {
    flex: 1;
    min-width: 0;
    border-right: 0;
    border-left: 0;
    padding: 0 0.65rem;
    gap: 0.45rem;
  }

  body.has-sidebar .header-brand-rail .brand {
    font-size: 1.2rem;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body.has-sidebar .header-toolbar {
    flex: 0 0 auto;
    padding: 0 0.55rem 0 0;
    background: transparent;
    border-bottom: 0;
    backdrop-filter: none;
  }

  body.has-sidebar .header-toolbar .header-actions {
    gap: 0.25rem;
  }

  body.has-sidebar .header-toolbar .locale-trigger {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.22);
    color: #fff;
  }

  body.has-sidebar .header-toolbar .locale-trigger:hover,
  body.has-sidebar .header-toolbar .header-lang.is-open .locale-trigger {
    border-color: rgba(255, 255, 255, 0.45);
    color: #fff;
  }

  body.has-sidebar .header-toolbar .icon-btn.header-icon-btn {
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
  }

  body.has-sidebar .header-toolbar .icon-btn.header-icon-btn:hover,
  body.has-sidebar .header-toolbar .icon-btn.header-icon-btn:focus-visible,
  body.has-sidebar .header-toolbar .icon-btn.header-icon-btn[aria-expanded='true'] {
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
  }

  body.has-sidebar .header-toolbar .auth-slot .btn {
    border-color: rgba(255, 255, 255, 0.28);
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
  }

  body.has-sidebar .header-search-wrap .header-search {
    inset-inline-end: 0;
    inset-inline-start: auto;
  }

  .category-page,
  .topic-page {
    padding: 1.25rem 1rem 2.5rem;
  }

  .category-column,
  .topic-column,
  .article-column {
    width: 100%;
  }

  .article-page {
    padding: 1.25rem 1rem 2.75rem;
  }

  .article-meta-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .article-cover-wrap,
  .topic-reading-cover {
    border-radius: var(--radius);
  }

  .page-hero {
    padding-top: 1.25rem;
  }

  .hero-featured {
    padding: 1.75rem 0 2.5rem;
    min-height: min(78vh, 36rem);
    margin-bottom: 0;
  }

  

  

  .hero-featured::after {
    display: none;
  }

  .hero-featured-inner {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .hero-featured-copy {
    max-width: 100%;
  }

  

  /* Stronger left-only mist when dome is more centered on small screens */
  

  

  .hero-featured-copy h1 {
    font-size: clamp(1.65rem, 7.5vw, 2.15rem);
    max-width: none;
  }

  .hero-cta,
  .hero-featured-copy .hero-cta {
    width: 100%;
  }

  .hero-cta .btn {
    flex: 1 1 auto;
    min-width: 0;
  }

  .section {
    padding: 2.25rem 0;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .featured-story-copy {
    padding: 1.15rem 1rem 1.35rem;
  }

  .featured-story-copy h3 {
    font-size: 1.45rem;
  }

  .start-path a {
    padding: 0.9rem 1rem;
  }

  .start-journey::before {
    inset-inline-start: 1.35rem;
  }

  .start-journey a {
    grid-template-columns: auto 1fr;
    gap: 0.75rem 0.9rem;
    padding: 0.9rem 0.35rem 0.9rem 0.15rem;
  }

  .start-journey a:hover,
  .start-journey a:focus-visible {
    transform: none;
    background: rgba(var(--color-primary-rgb), 0.06);
    box-shadow: none;
  }

  html[dir='rtl'] .start-journey a:hover,
  html[dir='rtl'] .start-journey a:focus-visible {
    transform: none;
  }

  .start-journey-index {
    width: 2.7rem;
    height: 2.7rem;
    font-size: 0.9rem;
  }

  .start-journey-arrow {
    display: none;
  }

  .start-journey-copy strong {
    font-size: 1.15rem;
  }

  .start-journey-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .start-journey-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .start-journey::before {
    inset-inline-start: 1.35rem;
  }

  .start-journey a {
    grid-template-columns: auto 1fr;
    gap: 0.75rem 0.9rem;
    padding: 0.9rem 0.35rem 0.9rem 0.15rem;
  }

  .start-journey a:hover,
  .start-journey a:focus-visible {
    transform: none;
    background: rgba(var(--color-primary-rgb), 0.06);
    box-shadow: var(--shadow-hover);
  }

  html[dir='rtl'] .start-journey a:hover,
  html[dir='rtl'] .start-journey a:focus-visible {
    transform: none;
  }

  .start-journey-index {
    width: 2.7rem;
    height: 2.7rem;
    font-size: 0.9rem;
  }

  .start-journey-arrow {
    display: none;
  }

  .start-journey-copy strong {
    font-size: 1.15rem;
  }

  .quote-block {
    padding: 1.25rem;
  }

  .quote-block blockquote {
    font-size: 1.25rem;
  }

  .cta-banner {
    padding: 1.35rem;
  }

  .timeline-toolbar {
    position: static;
    gap: 0.4rem;
  }

  .timeline-item-interactive {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .timeline-dot {
    display: none;
  }

  .lightbox {
    padding: 0.75rem;
  }

  .lightbox-nav {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 1.25rem;
  }

  .lightbox-prev {
    left: 0.4rem;
  }

  .lightbox-next {
    right: 0.4rem;
  }

  .back-to-top {
    right: 0.85rem;
    bottom: 0.85rem;
    width: 2.5rem;
    height: 2.5rem;
  }

  .header-actions {
    gap: 0.3rem;
  }

  .auth-slot .btn {
    padding: 0.28rem 0.6rem;
    font-size: 0.74rem;
  }

  .dropdown {
    left: 0;
    right: auto;
    transform: translateX(0);
    min-width: min(240px, calc(100vw - 2rem));
  }

  .nav-item:hover .dropdown,
  .nav-item:focus-within .dropdown,
  .nav-item.is-open .dropdown {
    transform: translateX(0);
  }

  .form-card,
  .admin-main {
    max-width: 100%;
  }

  .share-row {
    gap: 0.4rem;
  }

  .cred-badges {
    gap: 0.35rem;
  }

  .newsletter-form {
    flex-direction: column;
    align-items: stretch;
  }

  .newsletter-form .btn {
    width: 100%;
  }

  /* Admin shell: stacked sidebar + scrolling main on tablets & phones */
  .admin-shell {
    grid-template-columns: 1fr;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    grid-template-rows: auto 1fr;
  }

  .admin-sidebar {
    position: sticky;
    top: 0;
    z-index: 5;
    max-height: 38vh;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .admin-sidebar-inner {
    padding: 1rem 0.85rem 0.9rem;
  }

  .admin-brand {
    padding: 0.25rem 0.55rem 0.85rem;
  }

  .admin-brand-text {
    font-size: 1.3rem;
  }

  .admin-main {
    overflow-y: auto;
    overscroll-behavior: contain;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
    padding: 1.1rem 1rem 1.75rem;
  }

  .admin-nav-link,
  .admin-sidebar a.admin-nav-link {
    min-height: 2.65rem;
  }

  .header-inner {
    gap: 0.5rem;
  }

  .header-actions {
    gap: 0.3rem;
  }

  .locale-trigger {
    min-width: 2.9rem;
    padding: 0 0.5rem;
  }

  .hero-cta .btn {
    flex: 1 1 100%;
    min-width: 0;
  }

  .cta-panel-actions {
    width: 100%;
  }

  .cta-panel-actions .btn {
    flex: 1 1 auto;
  }

  .form-actions {
    width: 100%;
  }

  .home-search {
    flex-wrap: wrap;
    border-radius: var(--radius);
    padding: 0.65rem 0.75rem;
  }

  .home-search-btn {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 1.5rem, var(--container));
  }

  .brand {
    font-size: 1.25rem;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .header-inner {
    gap: 0.35rem;
    min-height: 62px;
  }

  :root {
    --header-h: 62px;
  }

  .header-actions {
    gap: 0.22rem;
  }

  .locale-trigger {
    min-width: 2.6rem;
    padding: 0 0.4rem;
    font-size: 0.72rem;
  }

  .icon-btn.header-icon-btn,
  .auth-slot .icon-btn.header-icon-btn,
  .header-actions .icon-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
  }

  .preview-grid,
  .card-grid,
  .gallery-grid,
  .timeline-cards {
    grid-template-columns: 1fr;
  }

  .gallery-strip {
    grid-auto-columns: minmax(180px, 78vw);
  }

  .gallery-river {
    grid-auto-columns: minmax(180px, 78vw);
  }

  .gallery-tile img {
    height: 180px;
  }

  .topic-header h1,
  .topic-banner h1,
  .article-hero-block h1 {
    font-size: clamp(1.65rem, 7vw, 2.1rem);
  }

  .topic-path-links {
    grid-template-columns: 1fr;
  }

  .topic-path-link.next {
    text-align: start;
  }

  .footer-newsletter {
    margin-top: 1.25rem;
  }

  .form-card {
    padding: 1.15rem;
  }

  .form-actions .btn {
    flex: 1 1 calc(50% - 0.4rem);
    min-width: 8rem;
  }

  .form-actions .btn-primary {
    flex: 1 1 100%;
  }

  .admin-sidebar {
    max-height: 34vh;
  }

  .admin-table-wrap .table {
    min-width: 32rem;
  }

  .page-hero h1 {
    font-size: clamp(1.6rem, 7vw, 2rem);
  }
}

@media (max-width: 380px) {
  .brand {
    font-size: 1.1rem;
  }

  .icon-btn.header-icon-btn,
  .auth-slot .icon-btn.header-icon-btn,
  .header-actions .icon-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
  }

  .hero-cta .btn {
    width: 100%;
  }

  .form-actions .btn {
    flex: 1 1 100%;
  }

  .locale-trigger {
    min-width: 2.4rem;
    letter-spacing: 0.02em;
  }
}

/* Admin nav unread badges */
.admin-nav-badge {
  display: inline-block;
  min-width: 1.25rem;
  padding: 0.1rem 0.35rem;
  margin-inline-start: 0.35rem;
  border-radius: 999px;
  background: var(--color-accent, #047857);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.2;
  vertical-align: middle;
}

.comment-item {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--color-border, #e5e7eb);
}
.comment-meta {
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}
.comment-body { margin: 0; }
.comment-form textarea {
  width: 100%;
  max-width: 40rem;
  margin: 0.75rem 0 0.5rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font: inherit;
  background: var(--color-surface, #fff);
  color: inherit;
}
.comment-msg.success { color: var(--color-accent, #047857); }
.comment-msg.error { color: #b91c1c; }
.continue-reading-bar { margin: 0.75rem 0 1rem; }
.sitemap-list { line-height: 1.7; }
.sitemap-list ul { margin: 0.25rem 0 0.5rem 1.25rem; }

/* Admin nav unread badges */
.admin-nav-badge {
  display: inline-block;
  min-width: 1.25rem;
  padding: 0.1rem 0.35rem;
  margin-inline-start: 0.35rem;
  border-radius: 999px;
  background: var(--color-accent, #047857);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.2;
  vertical-align: middle;
}

.comment-item {
  padding: 0.95rem 0;
  border-bottom: 1px solid rgba(var(--color-primary-rgb), 0.1);
}

.comment-item:last-child {
  border-bottom: 0;
}

.comment-meta {
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.comment-body {
  margin: 0;
  line-height: 1.65;
}

.comment-form textarea {
  width: 100%;
  max-width: none;
  margin: 0.85rem 0 0.55rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(var(--color-primary-rgb), 0.16);
  border-radius: var(--radius-sm);
  font: inherit;
  background: var(--color-page, #f3f8f5);
  color: inherit;
  resize: vertical;
  min-height: 5.5rem;
}

.comment-form textarea:focus {
  outline: none;
  border-color: rgba(var(--color-primary-rgb), 0.4);
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.12);
}

.comment-msg.success {
  color: var(--color-primary);
}

.comment-msg.error {
  color: #b91c1c;
}
.sitemap-list { line-height: 1.7; }
.sitemap-list ul { margin: 0.25rem 0 0.5rem 1.25rem; }

/* ——— Vintage classic skin: grandchild section hub + article leaf ——— */
body.article-classic,
body.section-classic {
  --classic-paper: #f2f6f3;
  --classic-ink: #1a2e24;
  --classic-rule: rgba(var(--color-primary-rgb), 0.28);
  --classic-grain: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.045'/%3E%3C/svg%3E");
}

html[data-theme='dark'] body.article-classic,
html[data-theme='dark'] body.section-classic {
  --classic-paper: #0e1713;
  --classic-ink: #e4ebe6;
  --classic-rule: rgba(var(--color-primary-rgb), 0.4);
}

body.article-classic,
body.section-classic {
  background-color: var(--classic-paper);
  background-image: var(--classic-grain);
  color: var(--classic-ink);
}

body.article-classic .article-page,
body.section-classic .category-page {
  padding-block: 2rem 3.5rem;
}

body.article-classic .article-column,
body.section-classic .category-column {
  width: min(100%, 720px);
}

body.section-classic .category-column {
  width: min(100%, 880px);
}

.article-kicker,
.category-kicker {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.category-header-rule {
  display: none;
  height: 1px;
  margin: 1.35rem 0 0;
  background: linear-gradient(
    90deg,
    transparent,
    var(--classic-rule, rgba(6, 78, 59, 0.28)) 12%,
    var(--classic-rule, rgba(6, 78, 59, 0.28)) 88%,
    transparent
  );
}

body.section-classic .category-header-rule {
  display: block;
}

body.section-classic .category-header {
  margin-bottom: 2rem;
  padding-bottom: 0.25rem;
}

body.section-classic .category-header h1 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--color-primary-dark);
}

body.section-classic .category-desc {
  margin-top: 0.75rem;
  font-size: 1.08rem;
  line-height: 1.7;
  max-width: 36rem;
}

body.section-classic .section-head {
  margin: 0.5rem 0 1.15rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--classic-rule);
}

body.section-classic .section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 0.02em;
}

body.section-classic .category-browse-grid {
  gap: 0.85rem;
}

body.section-classic .category-browse-card {
  border-color: rgba(var(--color-primary-rgb), 0.16);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow:
    0 1px 0 rgba(var(--color-primary-rgb), 0.06),
    0 10px 28px rgba(var(--color-primary-rgb), 0.1);
}

html[data-theme='dark'] body.section-classic .category-browse-card {
  background: rgba(17, 24, 39, 0.72);
}

body.section-classic .category-browse-thumb {
  aspect-ratio: 16 / 10;
}

body.section-classic .category-browse-title {
  font-size: clamp(0.84rem, 1.35vw, 0.96rem);
  letter-spacing: -0.01em;
}

body.section-classic .category-browse-text {
  padding: 1.2rem 1.25rem 1.4rem;
}

body.article-classic .article-hero-block {
  padding-bottom: 1.25rem;
  margin-bottom: 0.35rem;
  border-bottom: 1px solid var(--classic-rule);
}

body.article-classic .article-hero-block h1 {
  font-family: var(--font-display);
  font-size: clamp(2.15rem, 5vw, 3.15rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--color-primary-dark);
  margin: 0.35rem 0 0.85rem;
}

body.article-classic .article-summary {
  font-size: 1.18rem;
  line-height: 1.65;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--color-text-muted);
  max-width: 38rem;
}

body.article-classic .article-meta {
  margin-top: 0.85rem;
  letter-spacing: 0.02em;
}

body.article-classic .cred-badges {
  margin: 0.35rem 0 0.65rem;
}

body.article-classic .cred-badge {
  border-radius: 2px;
  border: 1px solid rgba(var(--color-primary-rgb), 0.22);
  background: transparent;
}

body.article-classic .article-cover-wrap {
  margin: 1.75rem 0 2rem;
  border-radius: 2px;
  box-shadow:
    0 0 0 1px rgba(var(--color-primary-rgb), 0.12),
    0 14px 36px rgba(var(--color-primary-rgb), 0.18);
}

body.article-classic .article-cover {
  border-radius: 2px;
  margin: 0;
}

body.article-classic .article-toc {
  border-radius: 2px;
  border-color: var(--classic-rule);
  background: rgba(var(--color-primary-rgb), 0.05);
}

body.article-classic .article-body {
  font-size: 1.08rem;
  line-height: 1.85;
}

body.article-classic .article-body h2,
body.article-classic .article-body h3 {
  font-family: var(--font-display);
  color: var(--color-primary-dark);
  letter-spacing: -0.01em;
}

body.article-classic .article-body h2 {
  margin-top: 2.35rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--classic-rule);
  font-size: clamp(1.45rem, 2.8vw, 1.75rem);
}

body.article-classic .article-body .pull-quote {
  margin: 2.1rem 0;
  padding: 1.4rem 1.5rem;
  border-inline-start: 3px solid var(--color-primary);
  border-radius: 0;
  background: rgba(var(--color-primary-rgb), 0.07);
  box-shadow: 6px 8px 0 rgba(var(--color-primary-rgb), 0.12);
  font-size: clamp(1.28rem, 2.6vw, 1.55rem);
}

html[dir='rtl'] body.article-classic .article-body .pull-quote {
  box-shadow: -6px 8px 0 rgba(var(--color-primary-rgb), 0.12);
}

body.article-classic .article-body .article-second-wrap {
  border-radius: 2px;
  box-shadow:
    0 0 0 1px rgba(var(--color-primary-rgb), 0.1),
    0 10px 28px rgba(var(--color-primary-rgb), 0.14);
}

body.article-classic .sources-panel {
  border-radius: 2px;
  border-color: var(--classic-rule);
  background: rgba(var(--color-primary-rgb), 0.04);
}

body.article-classic .article-related h2,
body.article-classic .article-comments h2 {
  font-family: var(--font-display);
  color: var(--color-primary);
  border-bottom: 1px solid var(--classic-rule);
  padding-bottom: 0.5rem;
}

body.article-classic .article-card {
  border-radius: 4px;
  border-color: rgba(var(--color-primary-rgb), 0.16);
}

@media (min-width: 640px) {
  body.section-classic .category-browse-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  body.section-classic .category-browse-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.75rem;
  }
}

/* ——— Modern reading skin: public articles + grandchild section hubs ——— */
body.article-classic,
body.section-classic {
  --classic-paper: #f3f8f5;
  --classic-ink: #1f2937;
  --classic-rule: rgba(var(--color-primary-rgb), 0.14);
}

html[data-theme='dark'] body.article-classic,
html[data-theme='dark'] body.section-classic {
  --classic-paper: #0c1612;
  --classic-ink: #e5e7eb;
  --classic-rule: rgba(var(--color-primary-rgb), 0.28);
}

body.article-classic,
body.section-classic {
  background-color: var(--classic-paper);
  background-image: none;
  color: var(--classic-ink);
}

body.article-classic .article-page,
body.section-classic .category-page {
  padding-block: 2rem 3.5rem;
}

body.article-classic .article-column {
  width: min(100%, 740px);
}

body.section-classic .category-column {
  width: min(100%, 880px);
}

.article-kicker,
.category-kicker {
  margin: 0 0 0.55rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.category-header-rule {
  display: none;
  height: 2px;
  margin: 1.5rem 0 0;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(var(--color-primary-rgb), 0.55),
    rgba(var(--color-primary-rgb), 0.12) 55%,
    transparent
  );
}

body.section-classic .category-header-rule {
  display: block;
}

body.section-classic .category-header {
  margin-bottom: 2.15rem;
  padding-bottom: 0.15rem;
}

body.section-classic .category-header h1 {
  font-family: var(--font-display);
  font-size: clamp(2.05rem, 4.5vw, 2.85rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--color-primary);
}

body.section-classic .category-desc {
  margin-top: 0.8rem;
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 38rem;
  color: var(--color-text-muted);
}

body.section-classic .section-head {
  margin: 0.35rem 0 1.25rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--classic-rule);
}

body.section-classic .section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: -0.01em;
}

body.section-classic .category-browse-grid {
  gap: 0.85rem;
}

body.section-classic .category-browse-card {
  border-color: rgba(var(--color-primary-rgb), 0.14);
  border-radius: var(--radius);
  background: var(--color-surface);
  box-shadow: var(--shadow-green);
}

html[data-theme='dark'] body.section-classic .category-browse-card {
  background: var(--color-surface);
}

body.section-classic .category-browse-card:hover {
  border-color: rgba(var(--color-primary-rgb), 0.35);
  box-shadow: var(--shadow-hover);
}

body.section-classic .category-browse-thumb {
  aspect-ratio: 16 / 10;
}

body.section-classic .category-browse-title {
  font-size: clamp(0.84rem, 1.35vw, 0.96rem);
  color: var(--color-primary-dark);
}

body.section-classic .category-browse-text {
  padding: 1.15rem 1.2rem 1.3rem;
}

body.article-classic .article-hero-block {
  padding-bottom: 1.15rem;
  margin-bottom: 0.25rem;
  border-bottom: 1px solid var(--classic-rule);
}

body.article-classic .article-hero-block h1,
body.article-classic .article-title {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.6vw, 2.95rem);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.02em;
  color: var(--color-primary);
  margin: 0.2rem 0 0.85rem;
}

body.article-classic .article-summary {
  font-size: clamp(1.08rem, 2vw, 1.2rem);
  line-height: 1.65;
  font-weight: 500;
  color: var(--color-text-muted);
  max-width: 38rem;
}

body.article-classic .article-meta-row {
  border-top-color: var(--classic-rule);
}

body.article-classic .cred-badges {
  margin: 0.25rem 0 0.7rem;
}

body.article-classic .cred-badge {
  border-radius: 999px;
  border: 0;
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

body.article-classic .article-cover-wrap,
body.article-classic .topic-reading-cover {
  margin: 1.75rem 0 2rem;
  border-radius: calc(var(--radius) + 2px);
  box-shadow: var(--shadow-green);
}

body.article-classic .article-cover-wrap .article-cover,
body.article-classic .topic-reading-cover .article-cover {
  border-radius: 0;
  margin: 0;
  object-position: center 32%;
}

body.article-classic .article-toc {
  border-radius: var(--radius-sm);
  border-color: rgba(var(--color-primary-rgb), 0.14);
  background:
    linear-gradient(160deg, rgba(var(--color-primary-rgb), 0.07), transparent 55%),
    var(--color-surface);
  box-shadow: 0 4px 16px rgba(var(--color-primary-rgb), 0.08);
}

body.article-classic .article-body {
  font-size: 1.085rem;
  line-height: 1.82;
}

body.article-classic .article-body h2,
body.article-classic .article-body h3 {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--color-primary-dark);
  letter-spacing: -0.01em;
}

body.article-classic .article-body h2 {
  margin: 1.15rem 0 0.45rem;
  padding-top: 0;
  border-top: 0;
  font-size: clamp(1.4rem, 2.5vw, 1.7rem);
}

body.article-classic .article-body h3 {
  margin: 0.95rem 0 0.35rem;
  font-size: clamp(1.15rem, 2vw, 1.3rem);
  font-weight: 700;
}

body.article-classic .article-body .pull-quote,
body.article-classic .topic-reading-body .pull-quote {
  margin: 2rem 0;
  padding: 1.35rem 1.45rem;
  border-inline-start: 4px solid var(--color-primary);
  border-radius: var(--radius-sm);
  background:
    linear-gradient(135deg, rgba(var(--color-primary-rgb), 0.1), rgba(var(--color-primary-rgb), 0.04)),
    var(--color-surface);
  box-shadow:
    0 4px 14px rgba(var(--color-primary-rgb), 0.12),
    0 14px 36px rgba(var(--color-primary-rgb), 0.18);
  font-size: clamp(1.22rem, 2.5vw, 1.48rem);
}

html[dir='rtl'] body.article-classic .article-body .pull-quote {
  box-shadow:
    0 4px 14px rgba(var(--color-primary-rgb), 0.12),
    0 14px 36px rgba(var(--color-primary-rgb), 0.18);
}

body.article-classic .article-body .article-second-wrap,
body.article-classic .topic-reading-body .article-second-wrap {
  margin: 2.25rem 0 2.5rem;
  border-radius: calc(var(--radius) + 2px);
  box-shadow: var(--shadow-green);
}

body.article-classic .article-second-wrap .article-second {
  object-position: center center;
}

/* Ahlulbayt Valarcheyum Vikasavum — keep Green Dome in both crops (portrait sources) */
body.article-classic[data-article-id='6a6425488071c7b5a6b4c8a8'] .article-cover-wrap .article-cover {
  object-position: 28% 58%;
}

body.article-classic[data-article-id='6a6425488071c7b5a6b4c8a8'] .article-second-wrap .article-second {
  object-position: 62% 72%;
}

body.article-classic .sources-panel {
  border-radius: var(--radius);
  border-color: rgba(var(--color-primary-rgb), 0.14);
  background:
    linear-gradient(160deg, rgba(var(--color-primary-rgb), 0.05), transparent 50%),
    var(--color-surface);
}

body.article-classic .article-section-head h2,
body.article-classic .article-related h2,
body.article-classic .article-comments h2 {
  font-family: var(--font-display);
  color: var(--color-primary);
  border-bottom: 0;
  padding-bottom: 0;
}

body.article-classic .article-related,
body.article-classic .article-comments {
  border-top-color: var(--classic-rule);
}

body.article-classic .article-comments-panel {
  border-radius: var(--radius);
  box-shadow: var(--shadow-green);
}

body.article-classic .article-card {
  border-radius: var(--radius);
  border-color: rgba(var(--color-primary-rgb), 0.14);
  box-shadow: var(--shadow-green);
}

@media (min-width: 640px) {
  body.section-classic .category-browse-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  body.section-classic .category-browse-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

/* ——— Homepage Meelad poem (card + circular Green Dome) ——— */
.home-meelad {
  position: relative;
  isolation: isolate;
  padding: clamp(3rem, 6.5vw, 5rem) 0;
  background: transparent;
  overflow: hidden;
}

.meelad-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.5rem, 4vw, 2.75rem);
  align-items: center;
  justify-items: center;
  width: min(100%, 58rem);
  margin-inline: auto;
  padding: clamp(1.75rem, 4.5vw, 2.75rem);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(var(--color-primary-rgb), 0.1);
  border-radius: calc(var(--radius) + 2px);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
  text-align: center;
}

.meelad-circle {
  position: relative;
  margin: 0;
  width: clamp(9.5rem, 28vw, 13.5rem);
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 3px solid rgba(var(--color-primary-rgb), 0.22);
  box-shadow:
    0 0 0 8px rgba(var(--color-primary-rgb), 0.06),
    var(--shadow-green);
  animation: meelad-float 7.5s ease-in-out infinite;
}

.meelad-circle::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  pointer-events: none;
}

.meelad-circle img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.meelad-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 36rem;
  margin-inline: auto;
}

.meelad-eyebrow {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--color-primary);
}

.meelad-poem {
  margin: 0;
  padding: 0;
  border: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(1.1rem, 3vw, 1.65rem);
}

.meelad-stanza {
  display: flex;
  flex-direction: column;
  gap: 0.35em;
}

.meelad-line {
  margin: 0;
  font-family: var(--font-display);
  /* Keep each poetic line on one row — large type was wrapping into ~8 visual lines */
  font-size: clamp(0.92rem, 2.1vw, 1.35rem);
  font-weight: 700;
  line-height: 1.45;
  color: var(--color-text);
  white-space: nowrap;
  opacity: 0;
  transform: translateY(1rem);
  transition:
    opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--meelad-delay, 0s);
}

.meelad-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.55rem 1.1rem;
  margin-top: clamp(1.35rem, 3.5vw, 2rem);
  padding-top: clamp(1rem, 2.5vw, 1.35rem);
  border-top: 1px solid rgba(var(--color-primary-rgb), 0.12);
  opacity: 0;
  transform: translateY(0.75rem);
  transition:
    opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--meelad-delay, 0.4s);
}

.meelad-meta cite {
  font-family: var(--font-body);
  font-style: normal;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

.meelad-card.reveal.in .meelad-line,
.meelad-card.reveal.in .meelad-meta {
  opacity: 1;
  transform: translateY(0);
}

@keyframes meelad-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-0.45rem);
  }
}

@media (min-width: 768px) {
  .meelad-card {
    grid-template-columns: auto minmax(0, 1fr);
    justify-items: stretch;
    text-align: start;
    gap: clamp(1.75rem, 3.5vw, 2.75rem);
    padding: clamp(2rem, 3.5vw, 2.85rem) clamp(2rem, 4vw, 3rem);
  }

  .meelad-content {
    margin-inline: 0;
    max-width: none;
  }

  .meelad-meta {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .meelad-content {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .meelad-poem {
    width: max-content;
    min-width: 100%;
    margin-inline: auto;
  }

  .meelad-line {
    font-size: clamp(0.8rem, 3.4vw, 1.05rem);
    line-height: 1.45;
    white-space: nowrap;
  }

  .meelad-meta {
    flex-direction: column;
    gap: 0.35rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .meelad-circle {
    animation: none;
  }

  .meelad-line,
  .meelad-meta {
    transition: none;
    opacity: 1;
    transform: none;
  }
}

html[data-theme='dark'] .meelad-card {
  border-color: rgba(var(--color-primary-rgb), 0.28);
  background: var(--color-surface);
}

html[data-theme='dark'] .meelad-circle {
  border-color: rgba(var(--color-primary-rgb), 0.4);
  box-shadow:
    0 0 0 8px rgba(var(--color-primary-rgb), 0.12),
    var(--shadow-green);
}

html[data-theme='dark'] .meelad-meta {
  border-top-color: rgba(var(--color-primary-rgb), 0.22);
}

/* —— Poem article presentation (same /article/:slug route) —— */
body.article-poem .article-column {
  width: min(100%, 640px);
}

body.article-poem .article-hero-block {
  text-align: center;
}

body.article-poem .article-kicker,
body.article-poem .cred-badges,
body.article-poem .article-title,
body.article-poem .article-summary {
  text-align: center;
  margin-inline: auto;
}

body.article-poem .article-title {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 5vw, 3rem);
  letter-spacing: -0.015em;
  line-height: 1.2;
}

body.article-poem .article-summary {
  font-family: var(--font-body);
  font-size: 1.02rem;
  max-width: 28rem;
  font-style: italic;
}

body.article-poem .article-meta-row {
  justify-content: center;
  flex-direction: column;
  align-items: center;
  border-top-color: rgba(var(--color-primary-rgb), 0.16);
}

body.article-poem .article-meta {
  justify-content: center;
}

body.article-poem .article-cover-wrap {
  border-radius: 50%;
  width: min(100%, 220px);
  aspect-ratio: 1;
  margin-inline: auto;
  box-shadow:
    0 0 0 6px rgba(var(--color-primary-rgb), 0.1),
    var(--shadow-green);
}

body.article-poem .article-cover-wrap .article-cover {
  object-position: center center;
}

body.article-poem .article-body--poem {
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(1.12rem, 2.4vw, 1.38rem);
  font-weight: 600;
  line-height: 1.85;
  letter-spacing: 0.01em;
  color: var(--color-text);
  max-width: 34rem;
  margin-inline: auto;
  padding-block: 0.5rem 1.5rem;
}

body.article-poem .article-body--poem > p {
  margin: 0.12em 0;
  opacity: 0;
  transform: translateY(0.55rem);
  transition:
    opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--poem-delay, 0s);
}

body.article-poem .article-body--poem.is-in > p,
body.article-poem .article-body--poem.reveal.in > p {
  opacity: 1;
  transform: translateY(0);
}

/* Stanza gap: empty paragraph or consecutive blank */
body.article-poem .article-body--poem > p:empty {
  display: block;
  height: 0;
  margin: 0.85em 0;
  opacity: 1;
  transform: none;
}

body.article-poem .article-body--poem > p + p {
  margin-top: 0.2em;
}

/* Larger gap after a blank line paragraph that only has <br> */
body.article-poem .article-body--poem > p:has(> br:only-child),
body.article-poem .article-body--poem > hr {
  margin: 1.15em auto;
  border: 0;
  height: 0;
  max-width: 3rem;
  border-top: 1px solid rgba(var(--color-primary-rgb), 0.18);
  opacity: 1;
  transform: none;
}

body.article-poem .article-body--poem h2,
body.article-poem .article-body--poem h3,
body.article-poem .article-body--poem .article-subhead {
  text-align: center;
  margin: 1.75rem 0 0.85rem;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600 !important;
}

body.article-poem .article-body--poem .article-second-wrap {
  border-radius: calc(var(--radius) + 2px);
  max-width: 20rem;
  margin-inline: auto;
}

body.article-poem .poem-type-badge {
  display: inline-block;
  margin: 0 0 0.65rem;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: rgba(var(--color-primary-rgb), 0.1);
}

@media (max-width: 640px) {
  body.article-poem .article-body--poem {
    font-size: clamp(1.05rem, 4.2vw, 1.2rem);
    line-height: 1.8;
  }

  body.article-poem .article-cover-wrap {
    width: min(100%, 168px);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.article-poem .article-body--poem > p {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.category-browse-type {
  display: inline-block;
  margin: 0 0 0.2rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--color-primary);
  opacity: 0.85;
}

/* Homepage — one continuous soft green atmosphere (no section seams) */
body.page-home {
  --home-ivory: #f7fbf9;
  --home-ink: #1c2b24;
  --home-muted: #6a736e;
  background:
    radial-gradient(circle at 10% 12%, rgba(133, 218, 183, 0.26), transparent 28%),
    radial-gradient(circle at 92% 28%, rgba(100, 190, 160, 0.18), transparent 30%),
    radial-gradient(circle at 18% 55%, rgba(133, 218, 183, 0.14), transparent 32%),
    radial-gradient(circle at 78% 78%, rgba(100, 190, 160, 0.16), transparent 28%),
    #f7fbf9;
  color: var(--home-ink);
}

html[data-theme='dark'] body.page-home {
  --home-ivory: #0c1210;
  --home-ink: #e8eee9;
  --home-muted: #a3b0a8;
  background: var(--home-ivory);
}

/* Hero — full-bleed green dome scene (copy left, dome in bg right) */
body.page-home .hero-featured {
  overflow: hidden;
  padding: clamp(2.75rem, 6vw, 4.5rem) 0 clamp(1.5rem, 4vw, 2.5rem);
  min-height: min(85vh, 52rem);
  margin-bottom: 0;
  background: transparent;
}

body.page-home .hero-featured::after {
  display: none;
}

body.page-home .hero-featured-inner {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  justify-items: start;
  /* Inherit .container width/inset — do NOT set width:100% (breaks ~140px site gutter) */
  min-height: min(62vh, 36rem);
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.page-home .hero-featured-copy {
  max-width: min(40rem, 100%);
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 0;
  z-index: 5;
  position: relative;
  text-align: start;
}

body.page-home .featured-label {
  margin: 0 0 0.65rem;
}

body.page-home .featured-label[hidden] {
  display: none !important;
}

body.page-home .hero-featured-copy h1 {
  font-family: var(--font-display);
  font-size: clamp(2.15rem, 4.8vw, 3.65rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--color-primary-dark);
  margin: 0 0 1rem;
  max-width: 16ch;
  text-shadow: 0 1px 24px rgba(255, 255, 255, 0.45);
}

html[data-theme='dark'] body.page-home .hero-featured-copy h1 {
  color: #ecfdf5;
  text-shadow: 0 1px 20px rgba(0, 0, 0, 0.35);
}

body.page-home .hero-copy-body {
  margin: 0;
}

body.page-home .hero-copy-body p {
  font-size: clamp(1.02rem, 1.5vw, 1.18rem);
  line-height: 1.7;
  color: var(--color-text);
  max-width: 36rem;
  margin: 0 0 0.65rem;
}

html[data-theme='dark'] body.page-home .hero-copy-body p {
  color: var(--color-text-muted);
}

body.page-home .hero-copy-body p:last-child {
  margin-bottom: 0;
}

body.page-home .hero-featured-copy .hero-cta {
  margin-top: 1.5rem;
  gap: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

body.page-home .hero-featured-copy .hero-cta .btn {
  border-radius: 999px;
  padding: 0.75rem 1.4rem;
  font-size: 0.95rem;
}

body.page-home .hero-text-dots {
  margin-top: 1.35rem;
}

body.page-home .hero-dot {
  border-color: rgba(var(--color-primary-rgb), 0.35);
  background: rgba(255, 255, 255, 0.55);
}

body.page-home .hero-dot.is-active {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

/* Reference 3-card row — shares page atmosphere */
body.page-home .home-ref-entries {
  position: relative;
  z-index: 5;
  padding:
    clamp(2rem, 4vh, 2.75rem)
    clamp(1rem, 3vw, 2rem)
    clamp(1.25rem, 3vw, 1.75rem);
  background: transparent;
}

/* Vishayangal / topics — shares page atmosphere (no separate smoke band) */
body.page-home .home-band-topics {
  --topics-green: #075b49;
  --topics-dark-green: #043c31;
  --topics-muted: #6d817b;
  --topics-border: rgba(7, 91, 73, 0.14);
  position: relative;
  z-index: 5;
  background: transparent;
  padding: clamp(3rem, 6vw, 5rem) 0 clamp(2.5rem, 5vw, 3.75rem);
}

body.page-home .home-band-topics .section-head-center {
  text-align: center;
  margin-bottom: clamp(2rem, 4vw, 2.8rem);
}

body.page-home .home-band-topics .section-eyebrow {
  display: inline-block;
  color: var(--topics-green);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: none;
}

body.page-home .home-band-topics .section-head-center h2 {
  margin-top: 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--topics-dark-green);
}

body.page-home .home-band-topics .section-head-center p {
  max-width: 38rem;
  margin: 0.9rem auto 0;
  color: var(--topics-muted);
  font-size: clamp(0.95rem, 1.6vw, 1.05rem);
  line-height: 1.8;
}

body.page-home .topics-mosaic {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.35rem;
  max-width: var(--container);
  margin: 0 auto;
  align-items: start;
}

body.page-home .topics-mosaic .home-ref-card {
  height: auto;
  align-self: start;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid var(--topics-border);
  border-radius: 26px;
  box-shadow: 0 24px 60px rgba(5, 73, 57, 0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition:
    border-color 0.25s ease,
    box-shadow 0.28s ease,
    transform 0.28s ease;
}

body.page-home .topics-mosaic .home-ref-card:hover {
  border-color: rgba(7, 91, 73, 0.28);
  box-shadow: 0 30px 70px rgba(5, 73, 57, 0.18);
  transform: translateY(-4px);
}

/* Equal media height so one portrait cover cannot stretch the grid row */
body.page-home .topics-mosaic .home-ref-card-media,
body.page-home .topics-mosaic .home-ref-card--portrait .home-ref-card-media {
  aspect-ratio: 4 / 3;
  background: var(--topics-dark-green);
}

body.page-home .topics-mosaic .home-ref-card-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 48, 37, 0.55), transparent 58%);
  pointer-events: none;
}

body.page-home .topics-mosaic .home-ref-card-media img {
  transition: transform 0.7s ease;
}

/* Character cover is tall — crop toward the Green Dome, not the foreground figure */
body.page-home .topics-mosaic .home-ref-card[data-slug='character'] .home-ref-card-media img {
  object-position: center 32%;
}

/* Life Story cover — keep the Green Dome in frame */
body.page-home .topics-mosaic .home-ref-card[data-slug='life-story'] .home-ref-card-media img {
  object-position: center 40%;
}

/* Teachings cover — keep the Green Dome in frame */
body.page-home .topics-mosaic .home-ref-card[data-slug='teachings'] .home-ref-card-media img {
  object-position: center 48%;
}

/* Family cover — zoom in to crop out painted border edges, keep dome */
body.page-home .topics-mosaic .home-ref-card[data-slug='family'] .home-ref-card-media img {
  object-position: 42% 35%;
  transform: scale(1.18);
  transform-origin: 42% 35%;
}

body.page-home .topics-mosaic .home-ref-card[data-slug='family']:hover .home-ref-card-media img {
  transform: scale(1.22);
  transform-origin: 42% 35%;
}

body.page-home .topics-mosaic .home-ref-card:hover .home-ref-card-media img {
  transform: scale(1.06);
}

body.page-home .topics-mosaic .home-ref-card-body {
  gap: 0.85rem;
  padding: 1rem 1.15rem 1.1rem;
  background: transparent;
}

body.page-home .topics-mosaic .home-ref-card-title {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--topics-dark-green);
  letter-spacing: -0.02em;
}

body.page-home .topics-mosaic .home-ref-card-arrow {
  width: 2.35rem;
  height: 2.35rem;
  font-size: 1rem;
  color: #fff;
  background: var(--topics-green);
  box-shadow: 0 10px 22px rgba(7, 91, 73, 0.22);
}

body.page-home .topics-mosaic .home-ref-card:hover .home-ref-card-arrow {
  background: var(--topics-dark-green);
  color: #fff;
}

@media (min-width: 720px) and (max-width: 899px) {
  body.page-home .topics-mosaic {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.4rem;
  }
}

body.page-home .home-ref-entries-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  max-width: 68rem;
  margin: 0 auto;
}

body.page-home .home-ref-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(var(--color-primary-rgb), 0.1);
  box-shadow: 0 1px 3px rgba(var(--color-primary-rgb), 0.04);
  transition:
    border-color 0.2s ease,
    box-shadow 0.22s ease,
    transform 0.22s ease;
}

body.page-home .home-ref-card:hover {
  border-color: rgba(var(--color-primary-rgb), 0.22);
  box-shadow: 0 4px 16px rgba(var(--color-primary-rgb), 0.1);
  transform: translateY(-2px);
}

body.page-home .home-ref-card-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #e8ebe6;
}

body.page-home .home-ref-card--portrait .home-ref-card-media {
  aspect-ratio: 3 / 4;
}

body.page-home .home-ref-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.35s ease;
}

body.page-home .home-ref-card--portrait .home-ref-card-media img {
  object-position: center top;
}

body.page-home .home-ref-card:hover .home-ref-card-media img {
  transform: scale(1.04);
}

body.page-home .home-ref-card-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.7rem 0.85rem 0.75rem;
  min-height: 0;
}

body.page-home .home-ref-card-title {
  font-family: var(--font-body);
  font-size: clamp(0.88rem, 1.4vw, 0.98rem);
  font-weight: 600;
  line-height: 1.35;
  color: var(--home-ink);
  letter-spacing: -0.01em;
}

body.page-home .home-ref-card-arrow {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  font-size: 0.85rem;
  color: var(--color-primary);
  border-radius: 999px;
  background: rgba(var(--color-primary-rgb), 0.08);
  transition: background 0.2s ease, color 0.2s ease;
}

body.page-home .home-ref-card:hover .home-ref-card-arrow {
  background: var(--color-primary);
  color: #fff;
}

html[data-theme='dark'] body.page-home .home-ref-card {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(var(--color-primary-rgb), 0.2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

html[data-theme='dark'] body.page-home .home-ref-card-media {
  background: #1a2420;
}

body.page-home .home-band {
  padding: clamp(3.5rem, 7vw, 5.5rem) 0;
}

body.page-home .home-band-soft {
  background: transparent;
}

body.page-home .home-band-path {
  padding: clamp(4rem, 8vw, 6rem) 0;
  z-index: auto;
}

body.page-home .section-eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
}

body.page-home .section-head h2,
body.page-home .section-head-center h2 {
  font-size: clamp(1.55rem, 2.6vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--color-primary-dark);
}

body.page-home .hadith-title {
  font-size: clamp(2.25rem, 4.8vw, 3.15rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

body.page-home .section-head-center {
  margin-bottom: clamp(2rem, 4vw, 2.75rem);
}

body.page-home .section-head-center h2::after {
  content: none;
}

body.page-home .preview-card,
body.page-home .article-card,
body.page-home .home-article {
  border-radius: 14px;
  border: 1px solid rgba(var(--color-primary-rgb), 0.1);
  box-shadow: none;
  background: rgba(255, 255, 255, 0.45);
}

html[data-theme='dark'] body.page-home .preview-card,
html[data-theme='dark'] body.page-home .article-card,
html[data-theme='dark'] body.page-home .home-article {
  background: rgba(17, 24, 39, 0.55);
  border-color: rgba(255, 255, 255, 0.08);
}

body.page-home .preview-card:hover,
body.page-home .article-card:hover,
body.page-home .home-article:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(var(--color-primary-rgb), 0.08);
}

body.page-home .home-band-hadith .section-eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  color: var(--color-primary);
}

body.page-home .hadith-slider {
  max-width: min(56rem, 100%);
}

body.page-home .hadith-slider-stage {
  padding-inline: clamp(3rem, 8vw, 4.5rem);
}

body.page-home .hadith-nav {
  border-radius: 50%;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 10px 28px rgba(var(--color-primary-rgb), 0.12);
}

body.page-home .meelad-card {
  border-radius: 14px;
  border: 1px solid rgba(var(--color-primary-rgb), 0.1);
  box-shadow: none;
  background: rgba(255, 255, 255, 0.45);
}

html[data-theme='dark'] body.page-home .meelad-card {
  background: rgba(17, 24, 39, 0.5);
}

body.page-home .meelad-circle {
  border-radius: 14px;
}

body.page-home .cta-panel {
  border-radius: 14px;
  border: 1px solid rgba(var(--color-primary-rgb), 0.1);
  box-shadow: none;
  background: rgba(255, 255, 255, 0.45);
}

html[data-theme='dark'] body.page-home .cta-panel {
  background: rgba(17, 24, 39, 0.5);
}

body.page-home .cta-panel-image-card {
  border-radius: 14px;
  box-shadow: none;
}

body.page-home .cta-panel-image-card::before {
  content: none;
}

body.page-home .gallery-river .gallery-tile {
  border-radius: 12px;
}

body.page-home .quote-block-soft {
  border-radius: 14px;
  border: 1px solid rgba(var(--color-primary-rgb), 0.1);
  box-shadow: none;
  background: rgba(255, 255, 255, 0.45);
}

body.page-home .library-card,
body.page-home .library-card--teaser {
  border-radius: 14px;
}

@media (min-width: 900px) {
  body.page-home .hero-featured-inner {
    min-height: min(68vh, 40rem);
  }

  body.page-home .hero-featured-copy h1 {
    max-width: 14ch;
  }

  body.page-home .home-ref-entries-inner,
  body.page-home .topics-mosaic {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
  }

  

  
}

@media (max-width: 899px) {
  body.page-home .hero-featured {
    padding: clamp(1.75rem, 5vw, 2.5rem) 0 clamp(1.25rem, 3vw, 2rem);
    min-height: min(78vh, 36rem);
    margin-bottom: 0;
  }

  

  

  

  body.page-home .hero-featured::after {
    display: none;
  }

  body.page-home .hero-featured-inner {
    min-height: min(52vh, 28rem);
  }

  body.page-home .hero-featured-copy h1 {
    max-width: none;
    font-size: clamp(1.85rem, 6.5vw, 2.35rem);
  }

  

  
}

@media (max-width: 480px) {
  body.page-home .hero-featured {
    min-height: min(72vh, 32rem);
  }

  body.page-home .home-ref-entries-inner,
  body.page-home .topics-mosaic {
    gap: 1.25rem;
  }

  body.page-home .home-ref-card-body {
    padding: 0.6rem 0.75rem 0.65rem;
  }

  body.page-home .topics-mosaic .home-ref-card {
    border-radius: 22px;
  }

  body.page-home .topics-mosaic .home-ref-card-body {
    padding: 0.9rem 1rem 1rem;
  }

  body.page-home .topics-mosaic .home-ref-card-arrow {
    width: 2.1rem;
    height: 2.1rem;
  }
}

/* ================================================================
   HOME HERO SLIDER — split text + portrait card
   Edit slides in index.html (search home-hero-slider).
   ================================================================ */

#home-hero-slider {
  --green: #087a52;
  --dark-green: #063f2d;
  --light-green: #e6f5ed;
  --soft-green: #bce8d2;
  --white: #ffffff;
  --text: #102d22;
  --gray: #63746d;
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  padding-block: clamp(5rem, 8vh, 6.5rem) clamp(4.5rem, 8vh, 5.5rem);
  background: transparent;
  color: var(--text);
  font-family: var(--font-body);
}

#home-hero-slider .hero-slider-inner {
  position: relative;
  min-height: calc(100svh - var(--header-h) - clamp(7rem, 14vh, 10rem));
}

#home-hero-slider .hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: start;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.65s ease, visibility 0.65s ease;
}

#home-hero-slider .hero-slide.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 5;
}

#home-hero-slider .hero-content {
  position: relative;
  z-index: 10;
  min-width: 0;
  padding-top: clamp(0.5rem, 2vh, 2.2rem);
  margin-right: clamp(-1rem, -2vw, -2.5rem);
  overflow: visible;
}

#home-hero-slider .hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 11px;
  border: 1px solid #c7e5d5;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
  backdrop-filter: blur(12px);
  line-height: 1.4;
}

#home-hero-slider .tag-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}

#home-hero-slider .hero-content h1 {
  max-width: 100%;
  margin-top: clamp(0.7rem, 1.6vw, 1rem);
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.6vw, 3rem);
  line-height: 1.24;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--dark-green);
  overflow-wrap: anywhere;
  word-break: normal;
  padding-bottom: 0.08em;
}

#home-hero-slider .hero-content h1 span {
  color: var(--green);
  display: inline-block;
  line-height: inherit;
}

#home-hero-slider .hero-content p {
  max-width: 30rem;
  margin-top: clamp(0.7rem, 1.4vw, 1.1rem);
  color: var(--gray);
  font-size: clamp(0.9rem, 1.3vw, 1.05rem);
  line-height: 1.65;
  overflow-wrap: anywhere;
}

#home-hero-slider .hero-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 1.15rem;
  padding: 10px 16px;
  border-radius: 100px;
  background: var(--green);
  color: white;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 800;
  box-shadow: 0 18px 40px rgba(8, 122, 82, 0.22);
  transition: 0.25s;
}

#home-hero-slider .hero-button:hover {
  transform: translateY(-4px);
  background: var(--dark-green);
}

#home-hero-slider .image-area {
  position: relative;
  min-width: 0;
  height: clamp(24rem, 68vh, 47.5rem);
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

#home-hero-slider .back-card {
  position: absolute;
  width: min(500px, 90%);
  height: calc(100% - 1.75rem);
  top: 28px;
  border-radius: 42px;
  background: white;
  box-shadow: 0 35px 85px rgba(3, 63, 45, 0.1);
}

#home-hero-slider .back-card.one {
  transform: translate(60px, 25px) rotate(7deg);
  opacity: 0.35;
}

#home-hero-slider .back-card.two {
  transform: translate(28px, 10px) rotate(3deg);
  opacity: 0.65;
}

#home-hero-slider .image-card {
  position: absolute;
  top: 0;
  width: min(510px, 92%);
  height: calc(100% - 0.5rem);
  overflow: hidden;
  border-radius: 42px;
  background: var(--dark-green);
  box-shadow: 0 45px 100px rgba(3, 63, 45, 0.23);
}

#home-hero-slider .image-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.08);
  transition: transform 4s ease;
}

#home-hero-slider .hero-slide.active .image-card img {
  transform: scale(1);
}

#home-hero-slider .image-info {
  position: absolute;
  z-index: 5;
  left: 35px;
  right: 35px;
  bottom: 35px;
  color: white;
}

#home-hero-slider .image-info small {
  color: var(--soft-green);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

#home-hero-slider .image-info h2 {
  margin-top: 6px;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

#home-hero-slider .slider-controls {
  position: absolute;
  z-index: 30;
  right: 0;
  bottom: 35px;
  display: flex;
  align-items: center;
  gap: 14px;
}

#home-hero-slider .slider-button {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid #c8e4d5;
  border-radius: 50%;
  background: white;
  color: var(--green);
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(3, 63, 45, 0.08);
  transition: 0.25s;
}

#home-hero-slider .slider-button:hover {
  background: var(--green);
  color: white;
  transform: scale(1.08);
}

#home-hero-slider .slide-number {
  min-width: 70px;
  text-align: center;
  color: var(--dark-green);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

@media (max-width: 1050px) {
  #home-hero-slider {
    min-height: auto;
    overflow: visible;
    padding-block: clamp(4.5rem, 10vw, 5.5rem) clamp(4rem, 8vw, 4.75rem);
  }

  #home-hero-slider .hero-slider-inner {
    min-height: auto;
    padding-bottom: 3.5rem;
  }

  #home-hero-slider .hero-slide {
    position: relative;
    inset: auto;
    display: none;
    grid-template-columns: 1fr;
    gap: clamp(1.5rem, 4vw, 2.25rem);
    width: 100%;
  }

  #home-hero-slider .hero-slide.active {
    display: grid;
  }

  #home-hero-slider .hero-content {
    padding-top: 0;
    margin-right: 0;
  }

  #home-hero-slider .hero-content h1 {
    font-size: clamp(1.55rem, 5.8vw, 2.25rem);
    line-height: 1.26;
  }

  #home-hero-slider .image-area {
    height: clamp(22rem, 62vw, 28rem);
    min-height: 22rem;
  }

  #home-hero-slider .image-card {
    position: relative;
    width: min(100%, 26rem);
    height: 100%;
    margin-inline: auto;
    inset-inline: 0;
  }

  #home-hero-slider .back-card {
    width: min(92%, 24rem);
    height: calc(100% - 1.5rem);
  }

  #home-hero-slider .slider-controls {
    left: 50%;
    right: auto;
    bottom: 1rem;
    transform: translateX(-50%);
  }
}

@media (max-width: 600px) {
  #home-hero-slider {
    padding-block: clamp(4rem, 12vw, 4.75rem) clamp(3.75rem, 10vw, 4.25rem);
  }

  #home-hero-slider .hero-slider-inner {
    padding-bottom: 3rem;
  }

  #home-hero-slider .hero-content h1 {
    font-size: clamp(1.4rem, 6.8vw, 1.9rem);
    line-height: 1.3;
  }

  #home-hero-slider .hero-content p {
    font-size: 0.9rem;
    line-height: 1.6;
  }

  #home-hero-slider .hero-button {
    width: 100%;
    justify-content: center;
    margin-top: 1.25rem;
  }

  #home-hero-slider .image-area {
    height: clamp(18rem, 70vw, 22rem);
    min-height: 18rem;
  }

  #home-hero-slider .image-card {
    width: 100%;
    max-width: 20rem;
    border-radius: 24px;
  }

  #home-hero-slider .back-card {
    width: 90%;
    max-width: 18rem;
    border-radius: 24px;
  }

  #home-hero-slider .back-card.one {
    transform: translate(18px, 14px) rotate(5deg);
  }

  #home-hero-slider .back-card.two {
    transform: translate(8px, 6px) rotate(2deg);
  }

  #home-hero-slider .image-info {
    left: 1.1rem;
    right: 1.1rem;
    bottom: 1.1rem;
  }

  #home-hero-slider .image-info h2 {
    font-size: clamp(1rem, 4.5vw, 1.2rem);
    line-height: 1.3;
  }

  #home-hero-slider .slider-button {
    width: 2.75rem;
    height: 2.75rem;
    font-size: 1rem;
  }
}
/* ================================================================
   HOME LIFE JOURNEY — ages 1–63 story card
   Edit content in home.js → initHomeLifeJourney / storyData
   ================================================================ */

#home-life-journey {
  --life-green: #075b49;
  --life-dark-green: #043c31;
  --life-light-green: #e7f5ef;
  --life-soft-green: #cce9de;
  --life-white: #ffffff;
  --life-text: #16352d;
  --life-muted: #6d817b;
  --life-border: rgba(7, 91, 73, 0.14);
  background: transparent;
  color: var(--life-text);
  padding: clamp(3rem, 6vw, 5rem) 0 clamp(2.5rem, 5vw, 3.75rem);
}

#home-life-journey .life-page {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0;
}

#home-life-journey .page-heading {
  text-align: center;
  margin-bottom: 45px;
}

#home-life-journey .page-heading small {
  display: inline-block;
  color: var(--life-green);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

#home-life-journey .page-heading h1 {
  margin-top: 13px;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3.2vw, 2.2rem);
  line-height: 1.2;
  color: var(--life-dark-green);
}

#home-life-journey .page-heading p {
  max-width: 620px;
  margin: 15px auto 0;
  color: var(--life-muted);
  line-height: 1.8;
}

#home-life-journey .story-card {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  min-height: 420px;
  overflow: hidden;
  border: 1px solid var(--life-border);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 30px 80px rgba(5, 73, 57, 0.13);
  backdrop-filter: blur(15px);
}

#home-life-journey .image-side {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  background: var(--life-dark-green);
}

#home-life-journey .image-side img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.45s ease, transform 0.7s ease;
}

#home-life-journey .image-side img.changing {
  opacity: 0;
  transform: scale(1.08);
}

#home-life-journey .image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 48, 37, 0.78), transparent 65%);
}

#home-life-journey .image-age {
  position: absolute;
  left: 25px;
  bottom: 25px;
  color: white;
  font-size: 4.5rem;
  font-weight: 900;
  line-height: 1;
}

#home-life-journey .image-age span {
  display: block;
  margin-top: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  opacity: 0.75;
}

#home-life-journey .text-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 55px clamp(28px, 5vw, 70px);
}

#home-life-journey .age-label {
  color: var(--life-green);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

#home-life-journey .text-side h2 {
  margin-top: 17px;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.8vw, 2rem);
  line-height: 1.25;
  color: var(--life-dark-green);
}

#home-life-journey .text-side p {
  margin-top: 22px;
  color: var(--life-muted);
  font-size: 1rem;
  line-height: 2;
}

#home-life-journey .read-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  margin-top: 30px;
  padding: 15px 22px;
  border-radius: 14px;
  background: var(--life-green);
  color: white;
  font-weight: 800;
  text-decoration: none;
  transition: 0.25s ease;
}

#home-life-journey .read-button:hover {
  transform: translateY(-3px);
  background: var(--life-dark-green);
  box-shadow: 0 15px 30px rgba(7, 91, 73, 0.22);
}

#home-life-journey .life-slider-controls {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 25px;
}

#home-life-journey .arrow-button {
  width: 52px;
  height: 52px;
  border: 1px solid var(--life-border);
  border-radius: 50%;
  background: white;
  color: var(--life-green);
  font-size: 1.3rem;
  cursor: pointer;
  transition: 0.25s ease;
}

#home-life-journey .arrow-button:hover {
  color: white;
  background: var(--life-green);
  transform: scale(1.07);
}

#home-life-journey .progress-line {
  position: relative;
  flex: 1;
  height: 5px;
  overflow: hidden;
  border-radius: 20px;
  background: var(--life-soft-green);
}

#home-life-journey .progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--life-green);
  transition: width 0.35s ease;
}

#home-life-journey .age-navigation {
  display: flex;
  gap: 10px;
  margin-top: 28px;
  padding: 8px 3px 15px;
  overflow-x: auto;
  scrollbar-width: thin;
}

#home-life-journey .age-button {
  flex: 0 0 58px;
  height: 55px;
  border: 1px solid var(--life-border);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--life-green);
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  transition: 0.25s ease;
}

#home-life-journey .age-button:hover {
  transform: translateY(-3px);
  border-color: var(--life-green);
}

#home-life-journey .age-button.active {
  color: white;
  background: var(--life-green);
  box-shadow: 0 12px 25px rgba(7, 91, 73, 0.22);
}

#home-life-journey .bottom-note {
  margin-top: 20px;
  text-align: center;
  color: var(--life-muted);
  font-size: 0.9rem;
}

@media (max-width: 800px) {
  #home-life-journey .story-card {
    grid-template-columns: 1fr;
  }

  #home-life-journey .image-side {
    min-height: 300px;
  }

  #home-life-journey .text-side {
    padding: 38px 25px 42px;
  }

  #home-life-journey .image-age {
    font-size: 3.5rem;
  }
}

@media (max-width: 500px) {
  #home-life-journey .page-heading h1 {
    font-size: 2rem;
  }

  #home-life-journey .page-heading p {
    font-size: 0.9rem;
  }

  #home-life-journey .image-side {
    min-height: 250px;
  }

  #home-life-journey .text-side h2 {
    font-size: 1.8rem;
  }

  #home-life-journey .text-side p {
    font-size: 0.9rem;
  }

  #home-life-journey .age-button {
    flex-basis: 50px;
    height: 50px;
  }

  #home-life-journey .arrow-button {
    width: 46px;
    height: 46px;
  }
}

/* ================================================================
   HOME PROPHET STORIES — hadith / message slider
   Edit slides in home.js → initHomeProphetStories
   ================================================================ */

#home-prophet-stories {
  --ps-green: #075b49;
  --ps-deep-green: #023c31;
  --ps-light-green: #dff3ea;
  --ps-text: #153a31;
  --ps-muted: #71847e;
  position: relative;
  min-height: auto;
  display: flex;
  align-items: center;
  overflow: visible;
  padding: clamp(3.5rem, 7vw, 5.5rem) 0;
  background: transparent;
  color: var(--ps-text);
}

#home-prophet-stories .background-glow,
#home-prophet-stories .glow-one,
#home-prophet-stories .glow-two {
  display: none;
}

#home-prophet-stories .story-container {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 0.95fr;
  align-items: center;
  gap: clamp(2.5rem, 6vw, 6rem);
}

#home-prophet-stories .story-content {
  padding: 1rem 0;
  min-width: 0;
}

#home-prophet-stories .section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ps-green);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

#home-prophet-stories .section-label span {
  width: 38px;
  height: 2px;
  background: var(--ps-green);
}

#home-prophet-stories .story-content h2 {
  max-width: 42rem;
  margin: 1.25rem 0 0;
  color: var(--ps-deep-green);
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.8vw, 3.4rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

#home-prophet-stories .story-content h2 em {
  color: var(--ps-green);
  font-style: normal;
}

#home-prophet-stories .quote-card {
  position: relative;
  max-width: 40rem;
  margin-top: 2rem;
  padding: 2rem clamp(1.4rem, 3vw, 2.5rem);
  overflow: hidden;
  border: 1px solid rgba(7, 91, 73, 0.12);
  border-radius: 27px;
  background: rgba(255, 255, 255, 0.65);
  box-shadow: 0 25px 65px rgba(8, 70, 56, 0.09);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

#home-prophet-stories .quote-symbol {
  position: absolute;
  top: -15px;
  left: 25px;
  color: rgba(7, 91, 73, 0.1);
  font-family: Georgia, serif;
  font-size: 9rem;
  line-height: 1;
  pointer-events: none;
}

#home-prophet-stories .quote-card p {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  font-weight: 600;
  line-height: 1.85;
}

#home-prophet-stories .quote-source {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 1.4rem;
  color: var(--ps-muted);
  font-size: 0.8rem;
}

#home-prophet-stories .quote-source span {
  width: 25px;
  height: 2px;
  background: var(--ps-green);
}

#home-prophet-stories .story-navigation {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 1.75rem;
}

#home-prophet-stories .nav-button {
  width: 52px;
  height: 52px;
  border: 1px solid rgba(7, 91, 73, 0.15);
  border-radius: 50%;
  background: white;
  color: var(--ps-green);
  font-size: 1.2rem;
  cursor: pointer;
  transition: 0.25s ease;
}

#home-prophet-stories .nav-button:hover {
  color: white;
  background: var(--ps-green);
  transform: translateY(-3px);
}

#home-prophet-stories .slide-number {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ps-muted);
}

#home-prophet-stories .slide-number strong {
  color: var(--ps-green);
  font-size: 1.2rem;
}

#home-prophet-stories .progress-dots {
  display: flex;
  gap: 9px;
  margin-top: 1.4rem;
}

#home-prophet-stories .progress-dot {
  width: 8px;
  height: 8px;
  border: none;
  border-radius: 50%;
  background: #bed2ca;
  cursor: pointer;
  transition: 0.3s ease;
  padding: 0;
}

#home-prophet-stories .progress-dot.active {
  width: 35px;
  border-radius: 20px;
  background: var(--ps-green);
}

#home-prophet-stories .image-column {
  position: relative;
  width: 100%;
  max-width: 32rem;
  justify-self: end;
}

#home-prophet-stories .image-card {
  position: relative;
  width: 100%;
  height: clamp(28rem, 62vh, 42rem);
  overflow: hidden;
  border-radius: 38px;
  background: var(--ps-deep-green);
  box-shadow: 0 40px 90px rgba(2, 60, 49, 0.22);
}

#home-prophet-stories .image-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.55s ease, transform 1s ease;
}

#home-prophet-stories .image-card img.changing {
  opacity: 0;
  transform: scale(1.08);
}

#home-prophet-stories .image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 45, 35, 0.94), rgba(0, 45, 35, 0.12) 70%);
  pointer-events: none;
}

#home-prophet-stories .image-information {
  position: absolute;
  z-index: 2;
  left: clamp(1.4rem, 3vw, 2.5rem);
  right: clamp(1.4rem, 3vw, 2.5rem);
  bottom: clamp(1.4rem, 3vw, 2.5rem);
  color: white;
}

#home-prophet-stories .image-information span {
  color: #9be1c5;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

#home-prophet-stories .image-information h3 {
  margin: 0.85rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.4vw, 2.1rem);
  font-weight: 700;
  line-height: 1.3;
  color: white;
}

#home-prophet-stories .image-line {
  width: 55px;
  height: 3px;
  margin-top: 1.2rem;
  border-radius: 10px;
  background: #9be1c5;
}

#home-prophet-stories .image-badge {
  position: absolute;
  top: 25px;
  right: 25px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 13px 17px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.12);
  color: white;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

#home-prophet-stories .image-badge span {
  font-size: 0.6rem;
  opacity: 0.7;
}

#home-prophet-stories .image-badge strong {
  font-size: 1.25rem;
}

@media (max-width: 950px) {
  #home-prophet-stories .story-container {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  #home-prophet-stories .story-content {
    max-width: 46rem;
  }

  #home-prophet-stories .image-column {
    justify-self: center;
  }

  
}

@media (max-width: 600px) {
  #home-prophet-stories {
    padding: 3.5rem 0;
  }

  #home-prophet-stories .story-content h2 {
    font-size: clamp(1.55rem, 7vw, 2.1rem);
  }

  #home-prophet-stories .quote-card {
    padding: 1.6rem 1.35rem;
  }

  #home-prophet-stories .quote-card p {
    font-size: 1rem;
  }

  #home-prophet-stories .image-card {
    height: 26rem;
    border-radius: 27px;
  }

  #home-prophet-stories .image-information {
    left: 1.25rem;
    right: 1.25rem;
    bottom: 1.5rem;
  }

  

  #home-prophet-stories .image-column {
    padding-bottom: 2rem;
  }
}

/* ——— Homepage ads band ——— */
.home-band-ads {
  padding: 2.25rem 0 2.5rem;
  background: transparent;
}

.home-band-ads[hidden] {
  display: none !important;
}

.home-ads-label {
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.home-ads-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

@media (min-width: 768px) {
  .home-ads-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-band-ads--single .home-ads-grid {
    grid-template-columns: 1fr;
  }
}

.home-ad-banner {
  display: block;
  overflow: hidden;
  border-radius: calc(var(--radius) + 2px);
  background: var(--color-muted);
  aspect-ratio: 21 / 9;
  box-shadow: 0 8px 28px rgba(var(--color-primary-rgb), 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

a.home-ad-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(var(--color-primary-rgb), 0.14);
}

.home-ad-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.home-band-ads--single .home-ad-banner {
  aspect-ratio: 3 / 1;
  max-height: 220px;
}

body.page-home .home-band-ads {
  background: transparent;
}

.home-ads-preview-empty {
  opacity: 0.85;
  outline: 1px dashed rgba(var(--color-primary-rgb), 0.25);
  outline-offset: -4px;
}