/* ==========================================================================
   مُجسد — Mujassd Design System (HTML version)
   Includes light + dark theme, animations, and all page components.
   ========================================================================== */

:root {
  --background: hsl(0, 0%, 100%);
  --foreground: hsl(201, 73%, 15%);
  --card: hsl(206, 35%, 97.5%);
  --card-foreground: hsl(201, 73%, 15%);
  --primary: hsl(172, 72%, 36%);
  --primary-foreground: hsl(206, 29%, 96%);
  --secondary: hsl(201, 73%, 15%);
  --secondary-foreground: hsl(206, 29%, 96%);
  --muted: hsl(206, 35%, 95%);
  --muted-foreground: hsl(201, 50%, 30%);
  --accent: hsl(31, 51%, 48%);
  --accent-foreground: hsl(206, 29%, 96%);
  --destructive: hsl(0, 72%, 51%);
  --destructive-foreground: hsl(0, 0%, 100%);
  --border: hsl(206, 25%, 88%);
  --input: hsl(206, 25%, 88%);
  --ring: hsl(172, 72%, 36%);
  --radius: 0.875rem;

  --primary-rgb: 26, 158, 144;
  --accent-rgb: 184, 126, 62;
  --secondary-rgb: 11, 50, 67;

  --gradient-hero: linear-gradient(135deg, hsl(172, 72%, 36%) 0%, hsl(172, 72%, 42%) 50%, hsl(31, 51%, 48%) 100%);
  --gradient-card: linear-gradient(145deg, hsl(206, 35%, 98%) 0%, hsl(206, 35%, 95%) 100%);
  --gradient-accent: linear-gradient(120deg, hsl(172, 72%, 36%), hsl(31, 51%, 55%));

  --shadow-elevation: 0 12px 40px -8px hsla(201, 73%, 15%, 0.15);
  --shadow-glow: 0 0 40px hsla(31, 51%, 48%, 0.25);
  --shadow-card: 0 6px 24px -6px hsla(201, 73%, 15%, 0.10);

  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-gentle: cubic-bezier(0.25, 0.1, 0.25, 1);
}

html.dark {
  --background: hsl(201, 50%, 8%);
  --foreground: hsl(206, 29%, 94%);
  --card: hsl(201, 45%, 12%);
  --card-foreground: hsl(206, 29%, 94%);
  --primary: hsl(172, 70%, 48%);
  --primary-foreground: hsl(201, 73%, 10%);
  --secondary: hsl(201, 55%, 14%);
  --secondary-foreground: hsl(206, 29%, 94%);
  --muted: hsl(201, 35%, 16%);
  --muted-foreground: hsl(206, 22%, 70%);
  --accent: hsl(31, 60%, 60%);
  --accent-foreground: hsl(201, 73%, 10%);
  --destructive: hsl(0, 62%, 50%);
  --destructive-foreground: hsl(206, 29%, 94%);
  --border: hsl(201, 30%, 20%);
  --input: hsl(201, 30%, 20%);
  --ring: hsl(172, 70%, 48%);

  --primary-rgb: 35, 207, 188;
  --accent-rgb: 219, 167, 109;
  --secondary-rgb: 19, 49, 67;

  --gradient-card: linear-gradient(180deg, hsl(201, 45%, 12%), hsl(201, 45%, 14%));
  --shadow-elevation: 0 4px 20px -2px hsla(0, 0%, 0%, 0.4);
  --shadow-glow: 0 0 30px hsla(172, 72%, 42%, 0.25);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { direction: rtl; scroll-behavior: smooth; }
body {
  font-family: 'Tajawal', Arial, sans-serif;
  font-weight: 400;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  transition: background-color 0.4s var(--ease-smooth), color 0.4s var(--ease-smooth);
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

h1 { font-weight: 800; letter-spacing: -0.01em; }
h2 { font-weight: 700; letter-spacing: -0.005em; }
h3, h4, h5, h6 { font-weight: 700; }
strong, b { font-weight: 700; }

/* Layout helpers */
.container { width: 100%; max-width: 1400px; margin: 0 auto; padding: 0 1.5rem; }
@media (min-width: 1024px) { .container { padding: 0 2.5rem; } }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.grid { display: grid; }
.hidden { display: none; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.text-center { text-align: center; }
.relative { position: relative; }
.absolute { position: absolute; }
.overflow-hidden { overflow: hidden; }

/* Typography */
.text-display { font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.text-headline { font-weight: 700; letter-spacing: -0.01em; line-height: 1.3; }
.text-editorial { font-weight: 800; letter-spacing: -0.01em; line-height: 1.4; }
.text-hadith { font-weight: 700; letter-spacing: 0.01em; line-height: 1.8; }
.text-manifesto { font-weight: 500; letter-spacing: 0.005em; line-height: 2; }
.text-statement { font-weight: 700; line-height: 1.6; }

.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
.text-5xl { font-size: 3rem; }
.uppercase { text-transform: uppercase; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-extrabold { font-weight: 800; }

.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.text-secondary-foreground { color: var(--secondary-foreground); }
.text-muted { color: var(--muted-foreground); }
.text-foreground { color: var(--foreground); }

.bg-primary { background: var(--primary); }
.bg-secondary { background: var(--secondary); }
.bg-card { background: var(--card); }

/* Gradients */
.gradient-hero { background: var(--gradient-hero); }
.gradient-card { background: var(--gradient-card); }
.gradient-accent { background: var(--gradient-accent); }

/* Shadows */
.shadow-elevation { box-shadow: var(--shadow-elevation); }
.shadow-card { box-shadow: var(--shadow-card); }

/* Borders / radius */
.border { border: 1px solid var(--border); }
.rounded { border-radius: var(--radius); }
.rounded-xl { border-radius: 1rem; }
.rounded-2xl { border-radius: 1.25rem; }
.rounded-full { border-radius: 9999px; }

/* Animations */
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes stat-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes glow-pulse { 0%,100% { opacity: 0.55; } 50% { opacity: 0.85; } }
@keyframes pulse-dot { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.4); opacity: 0.6; } }
@keyframes float-y { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes orbit-rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes particle-float { 0%,100% { transform: translateY(0); opacity: 0.12; } 50% { transform: translateY(-20px); opacity: 0.6; } }

.animate-fade-in { animation: fade-in 0.6s var(--ease-gentle) both; }
.animate-fade-up { animation: fade-up 0.5s var(--ease-gentle) both; }
.delay-100 { animation-delay: 80ms; }
.delay-200 { animation-delay: 160ms; }
.delay-300 { animation-delay: 240ms; }
.delay-400 { animation-delay: 320ms; }
.delay-500 { animation-delay: 400ms; }

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
html.dark .site-header { background: rgba(10, 25, 35, 0.85); }
.header-accent {
  height: 3px;
  background: linear-gradient(to left, transparent, var(--primary), var(--accent));
}
.nav-wrapper { position: relative; }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 4rem; }

.nav-desktop { display: none; }
@media (min-width: 1024px) {
  .nav-inner { display: none; }
  .nav-desktop {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    height: 6rem;
    gap: 2rem;
  }
}

.nav-group { display: flex; align-items: center; gap: 0.25rem; }
.nav-link {
  position: relative;
  padding: 0.75rem 1rem;
  opacity: 0.7;
  transition: opacity 0.3s;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.nav-link:hover, .nav-link.active { opacity: 1; }
.nav-link::before {
  content: '';
  position: absolute;
  left: 0.5rem; right: 0.5rem; top: 0;
  height: 2px; background: var(--primary);
  opacity: 0; transition: opacity 0.3s;
}
.nav-link.active::before { opacity: 1; }
.nav-label-en {
  font-size: 0.625rem; letter-spacing: 0.25em; text-transform: uppercase;
  font-weight: 500; color: var(--muted-foreground); opacity: 0.6;
}
.nav-link.active .nav-label-en { color: var(--primary); opacity: 1; }
.nav-label-ar { font-size: 1rem; font-weight: 700; margin-top: 2px; color: var(--foreground); opacity: 0.85; }
.nav-link.active .nav-label-ar { color: var(--foreground); opacity: 1; }

.nav-logo {
  display: flex; flex-direction: column; align-items: center; cursor: pointer;
}
.nav-logo img { height: 3.5rem; width: auto; }
html.dark .nav-logo img, html.dark .mobile-brand img { filter: brightness(0) invert(1); }
.nav-logo-row { display: flex; align-items: center; gap: 0.75rem; margin-top: 0.5rem; }
.nav-logo-line { height: 1px; width: 1.5rem; background: var(--border); }
.nav-logo-name { font-size: 1.25rem; font-weight: 800; color: var(--foreground); letter-spacing: -0.02em; }

.nav-auth-section { display: flex; align-items: center; justify-content: flex-end; gap: 1rem; }
.nav-divider { height: 3rem; width: 1px; background: linear-gradient(to bottom, transparent, var(--border), transparent); }
.btn-access {
  position: relative; padding: 0.75rem 1.5rem;
  background: var(--secondary); color: var(--secondary-foreground);
  display: flex; flex-direction: column; align-items: center;
  transition: background-color 0.3s;
}
.btn-access:hover { opacity: 0.9; }
.btn-access-en { font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.6; }
.btn-access-ar { font-size: 0.875rem; font-weight: 700; }

/* Theme toggle */
.theme-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.5rem; width: 2.5rem;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: rgba(var(--secondary-rgb), 0.05);
  color: var(--foreground);
  transition: all 0.3s;
  flex-shrink: 0;
}
.theme-toggle:hover { color: var(--primary); border-color: rgba(var(--primary-rgb), 0.4); }
.theme-toggle svg { width: 1rem; height: 1rem; position: absolute; transition: all 0.5s; }
.theme-toggle .icon-sun { opacity: 1; transform: rotate(0) scale(1); }
.theme-toggle .icon-moon { opacity: 0; transform: rotate(90deg) scale(0.5); }
html.dark .theme-toggle .icon-sun { opacity: 0; transform: rotate(-90deg) scale(0.5); }
html.dark .theme-toggle .icon-moon { opacity: 1; transform: rotate(0) scale(1); }

/* Mobile nav */
.mobile-brand { display: flex; align-items: center; gap: 0.75rem; cursor: pointer; }
.mobile-brand img { height: 2.5rem; }
.mobile-brand-name { font-size: 1.125rem; font-weight: 800; color: var(--foreground); line-height: 1; }
.mobile-brand-tag { font-size: 8px; letter-spacing: 0.3em; text-transform: uppercase; color: rgba(var(--primary-rgb), 0.6); margin-top: 2px; }
.mobile-actions { display: flex; align-items: center; gap: 0.5rem; }
.mobile-toggle { padding: 0.5rem; color: var(--foreground); }
.mobile-toggle svg { width: 1.5rem; height: 1.5rem; }

.mobile-panel {
  max-height: 0; overflow: hidden;
  transition: max-height 0.3s ease-out;
  background: rgba(var(--secondary-rgb), 0.04);
  border-top: 1px solid var(--border);
}
.mobile-panel.open { max-height: 500px; }
.mobile-panel-inner { padding: 1.5rem; }
.mobile-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
.mobile-item {
  display: flex; flex-direction: column; align-items: center;
  gap: 0.5rem; padding: 1rem; border-radius: 0.75rem;
  background: rgba(var(--secondary-rgb), 0.04);
  color: var(--muted-foreground); transition: all 0.3s;
}
.mobile-item:hover, .mobile-item.active { background: var(--secondary); color: var(--secondary-foreground); }
.mobile-item svg { width: 1.25rem; height: 1.25rem; }
.mobile-item-label { font-size: 0.875rem; font-weight: 700; }
.mobile-item-en { font-size: 8px; letter-spacing: 0.15em; text-transform: uppercase; opacity: 0.6; }
.mobile-auth-btn {
  display: block; width: 100%; margin-top: 1rem; padding: 1rem;
  background: var(--secondary); color: var(--secondary-foreground);
  border-radius: 0.75rem; font-weight: 700; font-size: 1rem; text-align: center;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5rem; padding: 0.625rem 1.25rem; font-weight: 600;
  border-radius: 0.5rem; transition: all 0.3s;
  font-size: 0.875rem; line-height: 1; white-space: nowrap;
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: var(--primary-foreground); }
.btn-primary:hover:not(:disabled) { opacity: 0.9; }
.btn-secondary { background: var(--secondary); color: var(--secondary-foreground); }
.btn-secondary:hover:not(:disabled) { opacity: 0.9; }
.btn-accent { background: var(--accent); color: var(--accent-foreground); }
.btn-accent:hover:not(:disabled) { opacity: 0.92; }
.btn-outline { background: transparent; border: 2px solid var(--secondary); color: var(--foreground); }
.btn-outline:hover:not(:disabled) { background: var(--secondary); color: var(--secondary-foreground); }
.btn-outline-primary { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline-primary:hover:not(:disabled) { background: var(--primary); color: var(--primary-foreground); }
.btn-ghost { background: transparent; color: var(--muted-foreground); }
.btn-ghost:hover:not(:disabled) { background: var(--muted); color: var(--foreground); }
.btn-destructive { background: var(--destructive); color: var(--destructive-foreground); }
.btn-lg { padding: 0.875rem 2rem; font-size: 1rem; height: 3rem; }
.btn-pill { border-radius: 9999px; }
.btn-block { width: 100%; }
.btn-icon { padding: 0.5rem; height: 2.5rem; width: 2.5rem; border-radius: 9999px; }

/* Cards */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.card-header { padding: 1.5rem; }
.card-content { padding: 1.5rem; }
.card-header + .card-content { padding-top: 0; }
.card-title { font-size: 1.25rem; font-weight: 700; color: var(--foreground); margin-bottom: 0.5rem; }
.card-description { font-size: 0.875rem; color: var(--muted-foreground); }

/* Forms */
.form-group { display: flex; flex-direction: column; gap: 0.5rem; }
.form-label { font-size: 0.875rem; font-weight: 500; color: var(--foreground); }
.form-input, .form-textarea, .form-select {
  width: 100%; padding: 0.625rem 0.875rem;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 0.5rem; font-size: 0.875rem;
  transition: all 0.2s; height: 3rem; color: var(--foreground);
}
.form-textarea { height: auto; min-height: 6rem; resize: vertical; line-height: 1.6; }
.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none; border-color: var(--primary);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--muted-foreground); opacity: 0.6; }

.badge {
  display: inline-flex; align-items: center; gap: 0.375rem;
  padding: 0.25rem 0.625rem; background: var(--muted);
  color: var(--muted-foreground); border-radius: 9999px;
  font-size: 0.75rem; font-weight: 500;
}
.badge-primary { background: rgba(var(--primary-rgb), 0.12); color: var(--primary); }
.badge-accent { background: rgba(var(--accent-rgb), 0.12); color: var(--accent); }
.badge-destructive { background: var(--destructive); color: var(--destructive-foreground); }
.badge-success { background: var(--primary); color: var(--primary-foreground); }

.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9999px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white; font-weight: 700; flex-shrink: 0;
}

/* ==========================================================================
   IMMERSIVE HERO (simplified scroll-driven effect)
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.5rem;
  overflow: hidden;
  background: var(--background);
}
.hero-atmosphere {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 48%, rgba(var(--primary-rgb), 0.12) 0%, transparent 60%),
    radial-gradient(ellipse at 50% 100%, rgba(var(--accent-rgb), 0.08) 0%, transparent 56%);
}
.hero-grid {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.32;
  background-image:
    linear-gradient(rgba(var(--primary-rgb), 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--primary-rgb), 0.08) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse at 50% 52%, black 22%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 52%, black 22%, transparent 78%);
}
.hero-particles { position: absolute; inset: 0; pointer-events: none; }
.hero-particle {
  position: absolute;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 14px rgba(var(--primary-rgb), 0.55);
  opacity: 0.4;
  animation: particle-float 5.5s ease-in-out infinite;
}

.hero-stage {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 64rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
}

.hero-podium-wrap {
  position: relative;
  width: min(96vw, 640px);
  aspect-ratio: 6 / 5;
}
.hero-podium-logo {
  position: absolute;
  bottom: 28%;
  left: 50%;
  transform: translateX(-50%);
  height: 60%;
  width: auto;
  filter: drop-shadow(0 18px 30px rgba(var(--primary-rgb), 0.35));
  animation: float-y 5s ease-in-out infinite;
}
html.dark .hero-podium-logo { content: url('assets/mujassd-logo-full-dark.png'); }

.hero-tier {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 50% / 35%;
  pointer-events: none;
}
.hero-tier::after {
  content: '';
  position: absolute;
  inset-inline: 4%;
  bottom: -2px;
  height: 55%;
  border-radius: 50%;
  background: var(--primary);
  filter: blur(14px);
  opacity: 0.7;
  animation: glow-pulse 4s ease-in-out infinite;
}
.hero-tier-lower {
  bottom: 4%;
  width: 60%;
  height: 12%;
  background: linear-gradient(180deg, #fff 0%, hsl(206, 30%, 92%) 55%, hsl(172, 40%, 78%) 100%);
  box-shadow: inset 0 -6px 14px rgba(var(--primary-rgb), 0.45), inset 0 4px 6px rgba(255, 255, 255, 0.8);
}
.hero-tier-upper {
  bottom: 14%;
  width: 44%;
  height: 10%;
  background: linear-gradient(180deg, #fff 0%, hsl(206, 30%, 92%) 55%, hsl(172, 45%, 76%) 100%);
  box-shadow: inset 0 -6px 14px rgba(var(--primary-rgb), 0.45), inset 0 4px 6px rgba(255, 255, 255, 0.8);
}
html.dark .hero-tier-lower {
  background: linear-gradient(180deg, hsl(201,45%,18%) 0%, hsl(201,50%,12%) 55%, hsl(172,60%,16%) 100%);
  box-shadow: inset 0 -6px 14px rgba(var(--primary-rgb), 0.55), inset 0 4px 6px rgba(255,255,255,0.1);
}
html.dark .hero-tier-upper {
  background: linear-gradient(180deg, hsl(201,45%,20%) 0%, hsl(201,50%,13%) 55%, hsl(172,60%,18%) 100%);
  box-shadow: inset 0 -6px 14px rgba(var(--primary-rgb), 0.55), inset 0 4px 6px rgba(255,255,255,0.1);
}

.hero-badge {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex; flex-direction: column;
  align-items: center; gap: 0.5rem;
  animation: float-y 4.5s ease-in-out infinite;
}
.hero-badge-circle {
  width: 4.5rem; height: 4.5rem;
  background: var(--card);
  border: 1px solid rgba(var(--primary-rgb), 0.2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
  box-shadow: 0 10px 30px -8px rgba(var(--primary-rgb), 0.35);
  transition: transform 0.3s;
}
.hero-badge:hover .hero-badge-circle { transform: scale(1.1); }
.hero-badge-circle svg { width: 1.75rem; height: 1.75rem; }
.hero-badge-label { font-size: 0.75rem; font-weight: 600; color: var(--foreground); opacity: 0.85; white-space: nowrap; }
@media (min-width: 768px) {
  .hero-badge-circle { width: 5rem; height: 5rem; }
  .hero-badge-circle svg { width: 2rem; height: 2rem; }
  .hero-badge-label { font-size: 0.8125rem; }
}

.hero-content { max-width: 48rem; }
.hero-overline {
  display: inline-flex; align-items: center; gap: 0.75rem;
  color: var(--primary); font-size: 0.6875rem;
  letter-spacing: 0.4em; text-transform: uppercase;
  font-weight: 600; margin-bottom: 1.5rem;
}
.hero-overline .line { width: 2rem; height: 1px; background: currentColor; }
.hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--foreground);
  margin-bottom: 1.5rem;
}
@media (min-width: 768px) { .hero-title { font-size: 3.5rem; } }
@media (min-width: 1024px) { .hero-title { font-size: 4rem; } }
.hero-title .accent { color: var(--primary); }
.hero-subtitle {
  font-size: 1.0625rem;
  color: var(--muted-foreground);
  max-width: 38rem;
  margin: 0 auto 2.5rem;
  line-height: 1.85;
}
@media (min-width: 768px) { .hero-subtitle { font-size: 1.125rem; } }

.hero-cta {
  display: inline-flex; align-items: center; gap: 0.625rem;
  height: 3.5rem; padding: 0 2.5rem;
  background: var(--primary); color: var(--primary-foreground);
  border-radius: 9999px;
  font-size: 1rem; font-weight: 700; letter-spacing: 0.02em;
  box-shadow: 0 18px 55px -12px var(--primary);
  transition: transform 0.3s, opacity 0.3s;
}
.hero-cta:hover { transform: scale(1.04); opacity: 0.95; }

.hero-scroll-hint {
  position: absolute; bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  color: var(--foreground); opacity: 0.5;
  font-size: 0.625rem; letter-spacing: 0.5em; text-transform: uppercase;
  font-weight: 600;
}
.hero-scroll-hint::after {
  content: ''; display: block;
  width: 1px; height: 2rem;
  background: linear-gradient(to bottom, var(--primary), transparent);
  animation: glow-pulse 2.2s ease-in-out infinite;
}

/* ==========================================================================
   FEATURES SECTION
   ========================================================================== */
.section { padding: 5rem 0; }
@media (min-width: 768px) { .section { padding: 7rem 0; } }
.section-muted { background: var(--muted); }
.section-bg { background: var(--background); }
.section-secondary { background: var(--secondary); color: var(--secondary-foreground); }

.section-header { text-align: center; max-width: 42rem; margin: 0 auto 3.5rem; }
.section-header .eyebrow {
  display: inline-block;
  font-size: 0.625rem; letter-spacing: 0.4em;
  text-transform: uppercase; font-weight: 600;
  color: var(--primary); opacity: 0.8;
  border: 1px solid rgba(var(--primary-rgb), 0.2);
  border-radius: 9999px; padding: 0.4rem 1rem;
  margin-bottom: 1.25rem;
}
.section-header h2 {
  font-size: 1.875rem; font-weight: 800;
  letter-spacing: -0.02em; color: var(--foreground);
  margin-bottom: 1.25rem;
}
@media (min-width: 768px) { .section-header h2 { font-size: 2.5rem; } }
@media (min-width: 1024px) { .section-header h2 { font-size: 3rem; } }
.section-header p { font-size: 1.125rem; color: var(--muted-foreground); font-weight: 500; }

.feature-grid {
  display: grid; grid-template-columns: 1fr; gap: 1.25rem;
  max-width: 72rem; margin: 0 auto;
}
@media (min-width: 640px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .feature-grid { grid-template-columns: repeat(4, 1fr); gap: 1.5rem; } }

.feature-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.75rem;
  overflow: hidden;
  transition: all 0.5s;
  cursor: pointer;
}
.feature-card:hover {
  border-color: rgba(var(--primary-rgb), 0.4);
  box-shadow: var(--shadow-elevation);
  transform: translateY(-4px);
}
.feature-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(to right, transparent, rgba(var(--primary-rgb), 0.5), transparent);
  opacity: 0; transition: opacity 0.5s;
}
.feature-card:hover::before { opacity: 1; }
.feature-card-index {
  position: absolute; top: 1rem; left: 1rem;
  font-size: 0.625rem; letter-spacing: 0.3em;
  color: var(--muted-foreground); opacity: 0.4;
  font-weight: 600;
}
.feature-card-icon {
  position: relative;
  width: 3.5rem; height: 3.5rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.1), rgba(var(--accent-rgb), 0.1));
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
  transition: transform 0.5s;
  margin-bottom: 1.25rem;
}
.feature-card:hover .feature-card-icon { transform: scale(1.05); }
.feature-card-icon::after {
  content: ''; position: absolute;
  bottom: -3px; right: -3px;
  width: 0.625rem; height: 0.625rem;
  background: var(--accent);
  border-radius: 50%; opacity: 0.8;
}
.feature-card h3 { font-size: 1.125rem; font-weight: 700; color: var(--foreground); margin-bottom: 0.625rem; line-height: 1.4; }
.feature-card p { font-size: 0.875rem; color: var(--muted-foreground); line-height: 1.65; }
.feature-card-hairline {
  height: 1px; margin-top: 1.25rem;
  background: linear-gradient(to right, transparent, var(--border), transparent);
}

/* ==========================================================================
   STATS SECTION
   ========================================================================== */
.stats-grid {
  display: grid; grid-template-columns: 1fr; gap: 1.25rem;
  max-width: 72rem; margin: 0 auto;
}
@media (min-width: 640px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }

.stat-tile {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.75rem;
  box-shadow: var(--shadow-card);
  transition: all 0.5s;
  overflow: hidden;
}
.stat-tile.in-view {
  animation: stat-rise 0.7s var(--ease-gentle) both;
}
.stat-tile:hover {
  border-color: rgba(var(--primary-rgb), 0.4);
  box-shadow: var(--shadow-elevation);
}
.stat-tile-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 1.25rem;
}
.stat-ring {
  position: relative;
  width: 56px; height: 56px;
}
.stat-ring svg {
  position: absolute; inset: 0;
  transform: rotate(-90deg);
}
.stat-ring svg circle.bg { stroke: var(--border); fill: none; stroke-width: 2.5; }
.stat-ring svg circle.fg {
  stroke: var(--primary); fill: none; stroke-width: 2.5; stroke-linecap: round;
  transition: stroke-dashoffset 1.4s var(--ease-gentle);
}
.stat-ring-icon {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
}
.stat-ring-icon svg { width: 1.25rem; height: 1.25rem; }
.stat-label-text {
  font-size: 0.625rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--muted-foreground); font-weight: 600;
}
.stat-value {
  font-size: 2.25rem; font-weight: 800; line-height: 1; color: var(--foreground);
  font-variant-numeric: tabular-nums; letter-spacing: -0.02em;
  direction: ltr; display: flex; align-items: baseline; gap: 0.25rem;
}
@media (min-width: 768px) { .stat-value { font-size: 3rem; } }
.stat-value .suffix { color: var(--primary); font-size: 1.875rem; }
.stat-caption { margin-top: 0.75rem; font-size: 0.875rem; color: var(--muted-foreground); line-height: 1.55; }
.stat-tile-hairline {
  height: 1px; margin-top: 1.25rem;
  background: linear-gradient(to right, transparent, var(--border), transparent);
}

/* ==========================================================================
   MANIFESTO / HADITH
   ========================================================================== */
.section-manifesto {
  padding: 6rem 0;
  background: var(--muted);
  position: relative;
  overflow: hidden;
}
.section-manifesto::before, .section-manifesto::after {
  content: ''; position: absolute; inset-inline: 0; height: 1px;
  background: linear-gradient(to right, transparent, rgba(var(--primary-rgb), 0.4), transparent);
}
.section-manifesto::before { top: 0; }
.section-manifesto::after { bottom: 0; }
@media (min-width: 768px) { .section-manifesto { padding: 8rem 0; } }

.hadith-box {
  position: relative;
  padding: 2.5rem 1.5rem;
  max-width: 56rem;
  margin: 0 auto;
}
@media (min-width: 768px) { .hadith-box { padding: 3.5rem 3rem; } }
.hadith-corner {
  position: absolute;
  width: 4rem; height: 4rem;
  border-color: rgba(var(--primary-rgb), 0.25);
}
@media (min-width: 768px) { .hadith-corner { width: 5rem; height: 5rem; } }
.hadith-corner.tr { top: 0; right: 0; border-top: 2px solid; border-right: 2px solid; border-top-right-radius: 0.5rem; }
.hadith-corner.tl { top: 0; left: 0; border-top: 2px solid; border-left: 2px solid; border-top-left-radius: 0.5rem; }
.hadith-corner.br { bottom: 0; right: 0; border-bottom: 2px solid; border-right: 2px solid; border-bottom-right-radius: 0.5rem; }
.hadith-corner.bl { bottom: 0; left: 0; border-bottom: 2px solid; border-left: 2px solid; border-bottom-left-radius: 0.5rem; }
.hadith-mark {
  position: absolute; font-size: 4rem;
  color: rgba(var(--primary-rgb), 0.15);
  line-height: 1; user-select: none;
}
.hadith-mark.right { top: 0.5rem; right: 1.5rem; }
.hadith-mark.left { bottom: 0; left: 1.5rem; }
.hadith-text {
  text-align: center;
  font-size: 1.25rem; font-weight: 700;
  line-height: 1.9; color: var(--foreground);
}
@media (min-width: 768px) { .hadith-text { font-size: 1.875rem; } }
@media (min-width: 1024px) { .hadith-text { font-size: 2.25rem; } }

.ornament-line { display: flex; align-items: center; justify-content: center; gap: 1rem; margin: 3.5rem 0; }
.ornament-line span { color: var(--accent); font-size: 1.25rem; }
.ornament-line .line {
  height: 1px; width: 4rem;
  background: linear-gradient(to right, transparent, rgba(var(--accent-rgb), 0.6), transparent);
}

.manifesto-text { max-width: 48rem; margin: 0 auto; text-align: center; }
.manifesto-text p { font-size: 1.0625rem; line-height: 1.9; margin-bottom: 2.5rem; color: var(--foreground); }
@media (min-width: 768px) { .manifesto-text p { font-size: 1.25rem; } }
.manifesto-text p:not(:first-child) { color: rgba(var(--secondary-rgb), 0.8); }
html.dark .manifesto-text p:not(:first-child) { color: rgba(255, 255, 255, 0.7); }

.manifesto-cta { margin-top: 4rem; display: flex; justify-content: center; }
.manifesto-cta-card {
  display: inline-flex; flex-direction: column; align-items: center; gap: 1.25rem;
  padding: 2rem 3rem;
  background: rgba(var(--secondary-rgb), 0.04);
  border-radius: 1.25rem;
  border: 1px solid rgba(var(--primary-rgb), 0.15);
}
.manifesto-cta-card h3 { font-size: 1.25rem; font-weight: 800; text-align: center; color: var(--foreground); }
.manifesto-cta-card p { font-size: 0.9375rem; color: var(--muted-foreground); }

/* SGS Section */
.sgs-content { max-width: 56rem; margin: 0 auto; text-align: center; }
.sgs-tag {
  display: inline-block; font-size: 0.625rem;
  letter-spacing: 0.4em; text-transform: uppercase;
  font-weight: 600; color: var(--primary); opacity: 0.7;
  margin-bottom: 2.5rem;
}
.sgs-heading { font-size: 1.5rem; font-weight: 800; line-height: 1.4; margin-bottom: 3rem; color: var(--foreground); }
@media (min-width: 1024px) { .sgs-heading { font-size: 2.25rem; } }
.sgs-logo-box {
  position: relative; display: inline-block;
  padding: 2.5rem 3rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: var(--shadow-card);
}
.sgs-logo-box img { height: 8rem; width: auto; }
@media (min-width: 1024px) { .sgs-logo-box img { height: 11rem; } }
.sgs-description { margin-top: 3.5rem; font-size: 1rem; line-height: 2; color: var(--muted-foreground); max-width: 36rem; margin-inline: auto; }
.sgs-tagline { margin-top: 2rem; font-size: 0.875rem; color: var(--muted-foreground); opacity: 0.7; }

/* ==========================================================================
   SITE FOOTER
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--background);
  padding: 3.5rem 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: repeat(4, 1fr); gap: 2rem; }
}
.footer-brand-col { grid-column: span 2; }
@media (min-width: 768px) { .footer-brand-col { grid-column: span 1; } }
.footer-brand-row { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.25rem; }
.footer-brand-row h2 { font-size: 1.875rem; font-weight: 800; color: var(--foreground); }
.footer-brand-row img { height: 2.75rem; width: 2.75rem; border-radius: 0.75rem; }
.footer-about { font-size: 0.875rem; line-height: 1.9; color: var(--muted-foreground); max-width: 18rem; }
.footer-socials { display: flex; align-items: center; gap: 0.75rem; margin-top: 1.5rem; }
.footer-socials a {
  height: 2.5rem; width: 2.5rem; border-radius: 0.75rem;
  border: 1px solid var(--border);
  background: var(--card);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted-foreground); transition: all 0.3s;
}
.footer-socials a:hover { color: var(--primary); border-color: rgba(var(--primary-rgb), 0.4); }
.footer-socials svg { width: 1rem; height: 1rem; }
.footer-col h3 { font-size: 0.875rem; font-weight: 700; color: var(--foreground); margin-bottom: 1.25rem; }
.footer-col ul { display: flex; flex-direction: column; gap: 0.75rem; }
.footer-col a { font-size: 0.875rem; color: var(--muted-foreground); transition: color 0.3s; }
.footer-col a:hover { color: var(--primary); }
.footer-newsletter { grid-column: span 2; }
@media (min-width: 768px) { .footer-newsletter { grid-column: span 1; } }
.footer-newsletter p { font-size: 0.75rem; color: var(--muted-foreground); line-height: 1.55; margin-bottom: 1.25rem; }
.footer-newsletter input {
  height: 3rem; width: 100%;
  padding: 0 1rem;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 0.75rem; font-size: 0.875rem;
  color: var(--foreground);
  margin-bottom: 0.625rem;
}
.footer-newsletter input:focus { outline: none; border-color: var(--primary); }
.footer-newsletter button {
  height: 2.25rem; padding: 0 1rem;
  background: var(--primary); color: var(--primary-foreground);
  border-radius: 0.5rem; font-size: 0.75rem; font-weight: 700;
  display: inline-flex; align-items: center; gap: 0.375rem;
  transition: opacity 0.2s;
}
.footer-newsletter button:hover { opacity: 0.92; }
.footer-newsletter button:disabled { opacity: 0.4; cursor: not-allowed; }
.footer-newsletter .done {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.875rem; color: var(--primary); font-weight: 600;
}

.footer-bottom {
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column;
  align-items: center; justify-content: space-between;
  gap: 0.75rem;
}
@media (min-width: 768px) { .footer-bottom { flex-direction: row; } }
.footer-bottom p { font-size: 0.75rem; color: var(--muted-foreground); }
.footer-bottom-links { display: flex; align-items: center; gap: 1.25rem; font-size: 0.75rem; }
.footer-bottom-links a { color: var(--muted-foreground); transition: color 0.3s; }
.footer-bottom-links a:hover { color: var(--primary); }

/* ==========================================================================
   AUTH PAGE (redesigned)
   ========================================================================== */
.auth-page {
  min-height: 100vh;
  position: relative;
  display: flex; align-items: center; justify-content: center;
  padding: 3rem 1rem;
  overflow-x: hidden;
  background: linear-gradient(135deg, var(--background) 0%, var(--muted) 50%, rgba(var(--primary-rgb), 0.05) 100%);
}
.auth-aurora {
  position: absolute; inset: 0; pointer-events: none;
}
.auth-aurora::before, .auth-aurora::after {
  content: ''; position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  filter: blur(140px); opacity: 0.5;
}
.auth-aurora::before { top: 0; right: 0; background: rgba(var(--primary-rgb), 0.15); }
.auth-aurora::after { bottom: 0; left: 0; background: rgba(var(--secondary-rgb), 0.15); }

.auth-topbar {
  position: absolute; inset-inline: 0; top: 0;
  padding: 1.25rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  z-index: 5;
}
.auth-topbar a {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.875rem; color: var(--muted-foreground);
  transition: color 0.3s;
}
.auth-topbar a:hover { color: var(--foreground); }

.auth-card {
  position: relative;
  width: 100%; max-width: 28rem;
  background: rgba(var(--secondary-rgb), 0.02);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  padding: 2rem;
  box-shadow: var(--shadow-elevation);
}
@media (min-width: 768px) { .auth-card { padding: 2.5rem; } }
.auth-card::before {
  content: ''; position: absolute;
  inset-inline: 3rem; top: 0; height: 1px;
  background: linear-gradient(to right, transparent, rgba(var(--primary-rgb), 0.5), transparent);
}
.auth-card-logo { display: flex; flex-direction: column; align-items: center; margin-bottom: 2rem; }
.auth-card-logo img { height: 5rem; width: auto; }
html.dark .auth-card-logo img { content: url('assets/mujassd-logo-full-dark.png'); }
.auth-card-tag {
  margin-top: 0.75rem;
  font-size: 0.625rem; letter-spacing: 0.4em; text-transform: uppercase;
  color: var(--primary); opacity: 0.65; font-weight: 600;
}
.auth-card-title { font-size: 1.5rem; font-weight: 800; color: var(--foreground); margin-bottom: 0.5rem; text-align: center; }
@media (min-width: 768px) { .auth-card-title { font-size: 1.875rem; } }
.auth-card-subtitle { font-size: 0.875rem; color: var(--muted-foreground); text-align: center; margin-bottom: 1.75rem; }

.auth-form { display: flex; flex-direction: column; gap: 1rem; }
.auth-form-group { display: flex; flex-direction: column; gap: 0.375rem; }
.auth-form-group label { font-size: 0.75rem; letter-spacing: 0.05em; color: var(--muted-foreground); }
.auth-form-group .input-with-icon { position: relative; }
.auth-form-group .input-with-icon svg {
  position: absolute; right: 0.75rem; top: 50%;
  transform: translateY(-50%);
  width: 1rem; height: 1rem;
  color: var(--muted-foreground); opacity: 0.6;
}
.auth-form-group input,
.auth-form-group select {
  width: 100%; height: 3rem;
  padding: 0 2.5rem 0 0.75rem;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  font-size: 0.9375rem; color: var(--foreground);
  font-family: inherit;
  appearance: none; -webkit-appearance: none;
}
.auth-form-group input:focus,
.auth-form-group select:focus { outline: none; border-color: var(--primary); }
.auth-submit {
  height: 3rem; margin-top: 0.5rem;
  background: var(--secondary); color: var(--secondary-foreground);
  border-radius: 0.75rem; font-weight: 700; font-size: 1rem;
  transition: opacity 0.3s;
}
.auth-submit:hover { opacity: 0.9; }
.auth-divider {
  display: flex; align-items: center; gap: 0.75rem;
  margin: 1.5rem 0;
}
.auth-divider .line { flex: 1; height: 1px; background: var(--border); }
.auth-divider span {
  font-size: 0.625rem; letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--muted-foreground); opacity: 0.6;
}
.auth-switch {
  display: block; width: 100%; text-align: center;
  font-size: 0.875rem; color: var(--muted-foreground);
  transition: color 0.3s;
}
.auth-switch:hover { color: var(--primary); }
.auth-switch strong { color: var(--primary); font-weight: 700; }

.auth-sgs {
  margin-top: 2rem; display: flex; flex-direction: column;
  align-items: center; gap: 0.75rem; opacity: 0.7;
}
.auth-sgs img { height: 2.25rem; }
.auth-sgs p {
  font-size: 0.625rem; letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--muted-foreground); text-align: center;
}

/* ==========================================================================
   GENERIC PAGE BANNER (used by inner pages)
   ========================================================================== */
.page-banner {
  background: var(--gradient-hero);
  color: var(--primary-foreground);
  padding: 2.5rem 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-elevation);
  margin: 2rem 0;
}
.page-banner h1 { font-size: 1.875rem; font-weight: 800; }
.page-banner p { font-size: 1.125rem; opacity: 0.9; margin-top: 0.5rem; }

.simple-header {
  border-bottom: 1px solid var(--border);
  background: var(--card);
}
.simple-header-inner {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 0;
}
.simple-header img { height: 2.5rem; cursor: pointer; }
html.dark .simple-header img { filter: brightness(0) invert(1); }
.simple-header h1 { font-size: 1.25rem; font-weight: 700; color: var(--foreground); }
.simple-header .divider { height: 1.5rem; width: 1px; background: var(--border); }

.breadcrumb {
  display: flex; align-items: center; gap: 0.75rem;
  margin-bottom: 2rem; font-size: 0.875rem; color: var(--muted-foreground);
}
.breadcrumb a:hover { color: var(--foreground); }
.breadcrumb .current { color: var(--foreground); }

/* ==========================================================================
   QUERY PAGE
   ========================================================================== */
.query-hero {
  background: var(--secondary);
  color: var(--secondary-foreground);
}
.query-hero-inner { padding: 4rem 0; max-width: 80rem; }
@media (min-width: 1024px) { .query-hero-inner { padding: 6rem 0; } }
.query-overline {
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 2rem;
}
.query-overline .line { width: 3rem; height: 1px; background: var(--primary); }
.query-overline span {
  color: var(--primary); font-size: 0.875rem;
  letter-spacing: 0.15em; text-transform: uppercase; font-weight: 500;
}
.query-headline { font-size: 2.25rem; font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; margin-bottom: 2rem; }
@media (min-width: 768px) { .query-headline { font-size: 3rem; } }
@media (min-width: 1024px) { .query-headline { font-size: 3.75rem; } }
.query-headline .accent { color: var(--primary); }
.query-sub { color: rgba(255, 255, 255, 0.6); font-size: 1.125rem; line-height: 1.75; max-width: 42rem; font-weight: 300; }

.query-layout {
  display: grid; grid-template-columns: 1fr; gap: 2rem;
  margin-top: -2rem;
}
@media (min-width: 1024px) {
  .query-layout { grid-template-columns: 7fr 5fr; gap: 4rem; margin-top: -4rem; }
}
.query-form-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  box-shadow: var(--shadow-elevation);
  padding: 2rem;
}
@media (min-width: 1024px) { .query-form-card { padding: 3rem; } }
.query-form-card h2 { font-size: 1.5rem; font-weight: 700; color: var(--foreground); margin-bottom: 0.75rem; }
.query-form-card .form-textarea { min-height: 15rem; font-size: 1.0625rem; line-height: 1.625; padding: 1.5rem; border-radius: 0.75rem; }
.query-meta { display: flex; justify-content: space-between; align-items: center; font-size: 0.75rem; color: var(--muted-foreground); margin-top: 0.5rem; }

.principles { display: flex; flex-direction: column; gap: 3rem; }
@media (min-width: 1024px) { .principles { padding-top: 6rem; } }
.principle { position: relative; padding-right: 2rem; }
.principle::before { content: ''; position: absolute; right: 0; top: 0; width: 1px; height: 100%; background: var(--border); }
.principle-tag {
  font-size: 0.75rem; font-weight: 500;
  letter-spacing: 0.15em; text-transform: uppercase;
  margin-bottom: 0.75rem; display: block;
}
.principle h3 { font-size: 1.125rem; font-weight: 700; color: var(--foreground); margin-bottom: 0.5rem; }
.principle p { font-size: 0.875rem; color: var(--muted-foreground); line-height: 1.6; }

.analysis-card {
  background: rgba(var(--primary-rgb), 0.06);
  border: 1px solid rgba(var(--primary-rgb), 0.2);
  border-radius: 0.75rem; padding: 1rem;
  display: flex; flex-direction: column; gap: 0.5rem;
  margin-top: 1.5rem;
}
.analysis-header { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; color: var(--primary); font-size: 0.875rem; }

/* ==========================================================================
   EXPERTS LIST
   ========================================================================== */
.expert-banner {
  border-bottom: 1px solid var(--border);
  padding: 3rem 0;
}
@media (min-width: 1024px) { .expert-banner { padding: 4rem 0; } }
.expert-title {
  font-size: 1.875rem; font-weight: 800;
  letter-spacing: -0.02em; color: var(--foreground); margin-bottom: 1rem;
}
@media (min-width: 1024px) { .expert-title { font-size: 3rem; } }
.expert-sub { color: var(--muted-foreground); font-size: 1.125rem; max-width: 36rem; line-height: 1.625; }

.expert-list-area { padding: 3rem 0; max-width: 80rem; }
.expert-row {
  display: flex; align-items: center; gap: 1.5rem;
  padding: 1.5rem 0; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background-color 0.2s;
}
.expert-row:hover { background: rgba(var(--secondary-rgb), 0.03); }
.expert-row-avatar {
  width: 3rem; height: 3rem; border-radius: 9999px;
  background: rgba(var(--primary-rgb), 0.1);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary); font-weight: 700; font-size: 0.875rem; flex-shrink: 0;
}
.expert-row-info { flex: 1; min-width: 0; }
.expert-row-info h3 { font-size: 1.125rem; font-weight: 700; color: var(--foreground); margin-bottom: 0.25rem; }
.expert-row-info p { font-size: 0.875rem; color: var(--muted-foreground); }
.expert-row-spec { display: none; max-width: 200px; }
@media (min-width: 1024px) { .expert-row-spec { display: block; flex-shrink: 0; } }
.expert-row-spec p { font-size: 0.875rem; color: var(--foreground); }
.expert-row-score { width: 5rem; text-align: left; flex-shrink: 0; }
.expert-row-score .value { font-size: 1.25rem; font-weight: 700; color: var(--foreground); }
.expert-row-score .label { font-size: 0.75rem; color: var(--muted-foreground); }
.expert-toggle {
  width: 2rem; height: 2rem; border-radius: 9999px;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.125rem; color: var(--muted-foreground);
  flex-shrink: 0; transition: all 0.2s;
}
.expert-row:hover .expert-toggle { border-color: var(--primary); color: var(--primary); }
.expert-row.expanded .expert-toggle {
  background: var(--primary); border-color: var(--primary);
  color: var(--primary-foreground); transform: rotate(45deg);
}
.expert-details { display: none; padding: 0 0 1.5rem; }
.expert-row.expanded + .expert-details { display: block; }
.expert-details-inner {
  background: var(--background); border: 1px solid var(--border);
  border-radius: 0.75rem; padding: 1.5rem; margin-right: 4.5rem;
}
.expert-details-grid {
  display: grid; grid-template-columns: 1fr; gap: 1.5rem;
  margin-bottom: 1.5rem; padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
@media (min-width: 768px) { .expert-details-grid { grid-template-columns: repeat(2, 1fr); } }
.expert-details-grid .value { font-size: 1.5rem; font-weight: 700; color: var(--foreground); }
.expert-details-grid .label { font-size: 0.875rem; color: var(--muted-foreground); }
.expert-details-grid .tag { font-size: 0.75rem; font-weight: 500; color: var(--muted-foreground); letter-spacing: 0.05em; text-transform: uppercase; display: block; margin-bottom: 0.5rem; }
.expert-actions { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1.5rem; }
@media (min-width: 640px) { .expert-actions { flex-direction: row; } .expert-actions .btn { flex: 1; } }

/* ==========================================================================
   CHAT
   ========================================================================== */
.chat-header { border-bottom: 1px solid var(--border); background: var(--card); padding: 1.5rem 0; }
.chat-header-content { display: flex; align-items: flex-start; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.chat-header h1 { font-size: 1.5rem; font-weight: 700; color: var(--foreground); margin-bottom: 0.5rem; }
@media (min-width: 1024px) { .chat-header h1 { font-size: 1.875rem; } }
.chat-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; font-size: 0.875rem; color: var(--muted-foreground); }
.chat-meta .dot { width: 4px; height: 4px; border-radius: 9999px; background: var(--border); }

.chat-area { flex: 1; padding: 2rem 0; display: flex; flex-direction: column; }
.chat-thread {
  max-width: 56rem; margin: 0 auto; width: 100%; flex: 1;
  display: flex; flex-direction: column; gap: 3rem;
}

.msg-expert { display: flex; flex-direction: column; gap: 1rem; }
.msg-header { display: flex; align-items: center; gap: 1rem; font-size: 0.75rem; color: var(--muted-foreground); }
.msg-header .line { width: 2.5rem; height: 1px; background: var(--primary); }
.msg-header .tag { color: var(--primary); font-weight: 500; letter-spacing: 0.15em; text-transform: uppercase; }
.msg-expert-body { padding-right: 3.5rem; }
.msg-expert-body p { font-size: 1.125rem; line-height: 2; font-weight: 300; color: var(--foreground); margin-bottom: 1rem; }
.msg-citations {
  margin-top: 1.5rem; padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; gap: 0.75rem;
}
.msg-citation-pill {
  font-size: 0.75rem; color: var(--muted-foreground);
  background: rgba(var(--secondary-rgb), 0.05);
  padding: 0.375rem 0.75rem; border-radius: 9999px;
}

.msg-user { display: flex; flex-direction: column; gap: 0.75rem; }
.msg-user-body {
  padding: 1rem 2rem 1rem 2.5rem;
  background: rgba(var(--secondary-rgb), 0.04);
  border-radius: 0.5rem;
  border-right: 2px solid var(--accent);
  color: var(--foreground); line-height: 1.625;
}
.msg-user .msg-header .line { background: var(--border); }
.msg-user .msg-header .tag { color: var(--muted-foreground); }

.chat-input-area { border-top: 1px solid var(--border); padding: 2rem 0 0; margin-top: 2rem; }
.chat-input-area .form-textarea { min-height: 7.5rem; font-size: 1rem; padding: 1.5rem; border-radius: 0.75rem; }
.chat-input-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 1rem; gap: 1rem; flex-wrap: wrap; }

.chat-session-footer { border-top: 1px solid var(--border); background: var(--muted); padding: 1rem 0; }
.chat-session-inner { display: flex; align-items: center; justify-content: space-between; font-size: 0.75rem; color: var(--muted-foreground); max-width: 56rem; margin: 0 auto; }
.dot-live { width: 8px; height: 8px; border-radius: 9999px; background: var(--primary); display: inline-block; margin-left: 0.5rem; }

/* ChatWithExpert specific */
.chat-with-expert { display: flex; flex-direction: column; min-height: 100vh; }
.chatx-header {
  border-bottom: 1px solid var(--border);
  background: var(--card);
  position: sticky; top: 0; z-index: 10;
}
.chatx-header-inner {
  padding: 1rem 0; display: flex;
  align-items: center; justify-content: space-between;
  max-width: 48rem; margin: 0 auto;
}
.chatx-back-btn {
  width: 2.25rem; height: 2.25rem; border-radius: 9999px;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted-foreground); transition: all 0.2s;
}
.chatx-back-btn:hover { color: var(--foreground); background: var(--muted); }
.chatx-expert-row { display: flex; align-items: center; gap: 0.75rem; }
.chatx-expert-avatar {
  width: 2.5rem; height: 2.5rem; border-radius: 9999px;
  background: rgba(var(--primary-rgb), 0.1);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary); font-weight: 700; font-size: 0.875rem;
}
.chatx-expert-name { font-size: 1.125rem; font-weight: 700; color: var(--foreground); line-height: 1.2; }
.chatx-expert-meta { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; color: var(--muted-foreground); margin-top: 0.125rem; }
.chatx-call-actions { display: flex; align-items: center; gap: 0.25rem; }
.chatx-call-btn {
  width: 2.25rem; height: 2.25rem; border-radius: 9999px;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted-foreground); transition: all 0.2s;
}
.chatx-call-btn:hover { color: var(--foreground); background: var(--muted); }

/* Video-call modal (external avatar embed) */
.chatx-video-modal {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0, 0, 0, 0.75);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
}
.chatx-video-modal[hidden] { display: none; }
.chatx-video-modal-card {
  width: 100%; max-width: 64rem;
  height: 100%; max-height: 80vh;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 1rem;
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.5);
}
.chatx-video-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--card);
}
.chatx-video-modal-who { display: flex; align-items: center; gap: 0.75rem; }
.chatx-video-modal-name { font-size: 1rem; font-weight: 700; color: var(--foreground); }
.chatx-video-modal-sub { font-size: 0.8125rem; color: var(--muted-foreground); margin-top: 0.125rem; }
.chatx-video-close {
  width: 2.5rem; height: 2.5rem; border-radius: 9999px;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted-foreground);
  border: 1px solid var(--border);
  background: var(--background);
  cursor: pointer; transition: all 0.2s;
}
.chatx-video-close:hover { color: var(--foreground); background: var(--muted); }
.chatx-video-close svg { width: 1.125rem; height: 1.125rem; }
.chatx-video-stage {
  flex: 1; position: relative;
  background: #000;
  display: flex; align-items: center; justify-content: center;
}
.chatx-video-stage iframe {
  width: 100%; height: 100%;
  border: 0;
  display: block;
}
.chatx-video-placeholder {
  display: flex; flex-direction: column; align-items: center; gap: 0.75rem;
  color: rgba(255, 255, 255, 0.85);
  text-align: center; padding: 2rem;
}
.chatx-video-placeholder svg { width: 3.5rem; height: 3.5rem; opacity: 0.8; }
.chatx-video-placeholder p { font-size: 1.125rem; font-weight: 600; }
.chatx-video-placeholder small { font-size: 0.8125rem; opacity: 0.65; max-width: 28rem; line-height: 1.7; }

.chatx-conversation { flex: 1; padding: 2.5rem 0; }
.chatx-thread { max-width: 48rem; margin: 0 auto; display: flex; flex-direction: column; gap: 2rem; }
.chatx-msg-expert p { font-size: 1.0625rem; line-height: 1.9; color: var(--foreground); margin-bottom: 1rem; }
.chatx-msg-user {
  align-self: flex-start; max-width: 85%;
  background: rgba(var(--primary-rgb), 0.06);
  border: 1px solid rgba(var(--primary-rgb), 0.1);
  border-radius: 1.25rem; border-top-right-radius: 0.25rem;
  padding: 1rem 1.25rem;
}
.chatx-footer { border-top: 1px solid var(--border); background: var(--background); padding: 1.25rem 0; }
.chatx-input-wrap { max-width: 48rem; margin: 0 auto; }
.chatx-input-box {
  display: flex; align-items: flex-end; gap: 0.75rem;
  background: var(--muted);
  border-radius: 1.25rem; padding: 0.5rem; padding-left: 1rem;
  border: 1px solid var(--border); transition: all 0.2s;
}
.chatx-input-box:focus-within { border-color: rgba(var(--primary-rgb), 0.4); }
.chatx-input-box textarea {
  flex: 1; background: transparent; border: none; resize: none;
  padding: 0.75rem; font-size: 1rem; line-height: 1.625;
  min-height: 3rem; max-height: 10rem; color: var(--foreground);
}
.chatx-input-box textarea:focus { outline: none; }
.chatx-send-btn {
  width: 2.5rem; height: 2.5rem; border-radius: 0.75rem;
  background: var(--primary); color: var(--primary-foreground);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: opacity 0.2s;
}
.chatx-send-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.chatx-hint { text-align: center; font-size: 0.75rem; color: var(--muted-foreground); opacity: 0.6; margin-top: 0.75rem; }

/* ==========================================================================
   DEPARTMENTS
   ========================================================================== */
.dept-stats-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-bottom: 2rem; }
@media (min-width: 768px) { .dept-stats-grid { grid-template-columns: repeat(2, 1fr); } }
.stat-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-card);
  padding: 1.5rem; display: flex; align-items: center; gap: 1rem;
}
.stat-icon-circle {
  width: 3rem; height: 3rem; border-radius: 9999px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.stat-icon-circle.primary { background: rgba(var(--primary-rgb), 0.1); color: var(--primary); }
.stat-icon-circle.accent { background: rgba(var(--accent-rgb), 0.1); color: var(--accent); }
.stat-card .value { font-size: 1.5rem; font-weight: 700; color: var(--foreground); }
.stat-card .label { font-size: 0.875rem; color: var(--muted-foreground); }

.search-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-card);
  padding: 1rem; margin-bottom: 2rem;
}
.search-box { position: relative; }
.search-box svg {
  position: absolute; right: 0.75rem; top: 50%;
  transform: translateY(-50%); width: 1.25rem; height: 1.25rem;
  color: var(--muted-foreground);
}
.search-box input {
  width: 100%; height: 3rem;
  padding: 0 2.5rem 0 1rem;
  background: transparent; border: 1px solid var(--border);
  border-radius: 0.5rem; font-size: 0.875rem; color: var(--foreground);
}
.search-box input:focus { outline: none; border-color: var(--primary); }

.dept-list { display: flex; flex-direction: column; gap: 1rem; }
.dept-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-card); overflow: hidden;
}
.dept-card-header {
  padding: 1.5rem; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; transition: background-color 0.3s;
}
.dept-card-header:hover { background: rgba(var(--secondary-rgb), 0.04); }
.dept-card-left { display: flex; align-items: center; gap: 1rem; }
.dept-icon-circle {
  width: 3rem; height: 3rem; border-radius: 9999px;
  background: rgba(var(--primary-rgb), 0.1); color: var(--primary);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.dept-card-header h3 { font-size: 1.25rem; font-weight: 700; color: var(--foreground); }
.dept-card-header p { font-size: 0.875rem; color: var(--muted-foreground); margin-top: 0.25rem; }
.dept-card-right { display: flex; align-items: center; gap: 1rem; font-size: 0.875rem; color: var(--muted-foreground); }
.dept-card-body { display: none; padding: 0 1.5rem 1.5rem; }
.dept-card.open .dept-card-body { display: block; }
.dept-card.open .dept-toggle-icon { transform: rotate(180deg); }
.dept-toggle-icon { transition: transform 0.3s; }
.dept-card-body-inner { padding-top: 1rem; border-top: 1px solid var(--border); }
.dept-card-body-inner h4 { font-size: 0.875rem; font-weight: 600; color: var(--muted-foreground); margin-bottom: 1rem; }
.employee-grid { display: grid; grid-template-columns: 1fr; gap: 0.75rem; }
@media (min-width: 768px) { .employee-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .employee-grid { grid-template-columns: repeat(3, 1fr); } }
.employee-card {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.75rem; background: rgba(var(--secondary-rgb), 0.04);
  border-radius: 0.5rem; transition: background-color 0.3s;
}
.employee-card:hover { background: rgba(var(--secondary-rgb), 0.06); }
.employee-card .avatar { width: 2.5rem; height: 2.5rem; font-size: 0.875rem; }
.employee-card .name { font-size: 0.875rem; font-weight: 500; color: var(--foreground); }
.employee-card .role { font-size: 0.75rem; color: var(--muted-foreground); }

/* ==========================================================================
   JOURNEYS-EXPERTS PAGE
   ========================================================================== */
.je-eyebrow { display: flex; align-items: center; gap: 0.75rem; font-size: 0.75rem; color: var(--muted-foreground); letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: 0.75rem; }
.je-eyebrow svg { width: 0.875rem; height: 0.875rem; color: var(--primary); }
.je-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; max-width: 64rem; }
@media (min-width: 640px) { .je-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .je-grid { grid-template-columns: repeat(3, 1fr); } }
.je-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
  transition: all 0.3s; cursor: pointer;
  display: flex; flex-direction: column;
}
.je-card:hover { border-color: rgba(var(--primary-rgb), 0.5); background: rgba(var(--primary-rgb), 0.04); }
.je-card.disabled { opacity: 0.6; cursor: not-allowed; }
.je-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; margin-bottom: 1rem; }
.je-card-icon {
  width: 3rem; height: 3rem; border-radius: 9999px;
  background: rgba(var(--primary-rgb), 0.1);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
}
.je-card-name { font-size: 1.125rem; font-weight: 700; color: var(--foreground); margin-top: 1rem; margin-bottom: 0.25rem; }
.je-card-spec { font-size: 0.75rem; color: var(--muted-foreground); line-height: 1.6; }
.je-card-foot {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.75rem; color: var(--muted-foreground);
  border-top: 1px solid var(--border);
  padding-top: 0.75rem; margin-top: 1rem;
}
.je-card-cta { display: inline-flex; align-items: center; gap: 0.375rem; color: var(--primary); font-weight: 700; }
.je-card:hover .je-card-cta { gap: 0.625rem; }

/* ==========================================================================
   JOURNEYS PAGE (shanti journeys with stages)
   ========================================================================== */
.journeys-layout {
  display: grid; grid-template-columns: 1fr; gap: 2rem;
  padding: 2.5rem 0;
}
@media (min-width: 1024px) { .journeys-layout { grid-template-columns: 340px 1fr; gap: 2.5rem; } }
.journey-index-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
@media (min-width: 1024px) { .journey-index-card { position: sticky; top: 7rem; align-self: flex-start; max-height: 80vh; } }
.journey-index-head { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border); }
.journey-index-head h2 { font-size: 0.875rem; font-weight: 700; color: var(--foreground); margin-bottom: 0.375rem; }
.journey-index-head p { font-size: 0.75rem; color: var(--muted-foreground); }
.journey-index-list { max-height: 60vh; overflow-y: auto; }
.journey-index-list ul { display: flex; flex-direction: column; }
.journey-index-list li { border-bottom: 1px solid var(--border); }
.journey-index-list li:last-child { border-bottom: none; }
.journey-index-item {
  width: 100%; text-align: right;
  padding: 1rem 1.25rem;
  border-right: 2px solid transparent;
  transition: all 0.2s;
  display: flex; align-items: baseline; gap: 0.75rem;
}
.journey-index-item:hover { background: rgba(var(--secondary-rgb), 0.04); }
.journey-index-item.active {
  background: rgba(var(--primary-rgb), 0.05);
  border-right-color: var(--primary);
}
.journey-index-item .num {
  font-size: 0.625rem; color: var(--muted-foreground);
  opacity: 0.7; letter-spacing: 0.05em; font-variant-numeric: tabular-nums;
}
.journey-index-item h3 { font-size: 0.875rem; line-height: 1.35; font-weight: 600; color: var(--foreground); }
.journey-index-item.active h3 { color: var(--primary); font-weight: 700; }
.journey-index-item p { font-size: 0.6875rem; color: var(--muted-foreground); margin-top: 0.25rem; }

.journey-detail { display: flex; flex-direction: column; gap: 2rem; }
.journey-meta-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.journey-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-bottom: 1rem; }
.journey-meta-card h2 { font-size: 1.5rem; font-weight: 800; line-height: 1.25; color: var(--foreground); margin-bottom: 0.75rem; }
@media (min-width: 768px) { .journey-meta-card h2 { font-size: 1.875rem; } }
.journey-meta-card .description { font-size: 0.9375rem; color: var(--muted-foreground); line-height: 1.95; }
.journey-meta-row {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 1.5rem; padding-top: 0.75rem;
  border-top: 1px solid var(--border); margin-top: 1rem;
  font-size: 0.75rem; color: var(--muted-foreground);
}
.journey-meta-row > div { display: flex; align-items: center; gap: 0.5rem; }
.journey-meta-row svg { width: 0.875rem; height: 0.875rem; color: var(--primary); }
.journey-meta-row strong { color: var(--foreground); font-weight: 700; }

.journey-stages-head { display: flex; align-items: baseline; justify-content: space-between; }
.journey-stages-head h3 { font-size: 0.875rem; font-weight: 700; color: var(--foreground); }
.journey-stages-head span { font-size: 0.6875rem; color: var(--muted-foreground); }
.journey-stages {
  position: relative;
  display: flex; flex-direction: column; gap: 1.25rem;
  padding-right: 1.75rem;
  border-right: 1px solid var(--border);
}
.journey-stage { position: relative; }
.journey-stage::before {
  content: attr(data-index);
  position: absolute; right: -1.85rem; top: 0.375rem;
  width: 1.5rem; height: 1.5rem;
  border-radius: 9999px;
  background: var(--background);
  border: 2px solid var(--primary);
  color: var(--primary);
  font-size: 0.625rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  font-variant-numeric: tabular-nums;
}
.journey-stage-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.journey-stage-card .stage-eyebrow { font-size: 0.6875rem; color: var(--muted-foreground); letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 0.375rem; }
.journey-stage-card h4 { font-size: 1rem; font-weight: 700; color: var(--foreground); line-height: 1.35; margin-bottom: 1rem; }
@media (min-width: 768px) { .journey-stage-card h4 { font-size: 1.125rem; } }
.journey-stage-question {
  background: var(--muted);
  border-radius: 0.5rem;
  border-right: 2px solid rgba(var(--primary-rgb), 0.5);
  padding: 1rem; margin-bottom: 1rem;
}
.journey-stage-question p:first-child { font-size: 0.6875rem; color: var(--primary); font-weight: 700; letter-spacing: 0.05em; margin-bottom: 0.375rem; }
.journey-stage-question p:last-child { font-size: 0.875rem; color: var(--foreground); line-height: 1.625; }
.journey-stage-answer p:first-child { font-size: 0.6875rem; color: var(--muted-foreground); font-weight: 700; letter-spacing: 0.05em; margin-bottom: 0.5rem; }
.journey-stage-answer p:last-child { font-size: 0.875rem; color: var(--foreground); line-height: 2; white-space: pre-line; }
.journey-stage-answer sup { color: var(--primary); font-weight: 700; }
.journey-stage-source {
  padding-top: 0.75rem; margin-top: 1rem;
  border-top: 1px solid var(--border);
  display: flex; align-items: flex-start; gap: 0.5rem;
  font-size: 0.6875rem; color: var(--muted-foreground); line-height: 1.5;
}
.journey-stage-source strong { color: var(--primary); }
.journey-stage-source em { font-style: italic; }

/* ==========================================================================
   PROFILE
   ========================================================================== */
.form-grid-2 { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 768px) { .form-grid-2 { grid-template-columns: repeat(2, 1fr); } }
.stat-tri-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 768px) { .stat-tri-grid { grid-template-columns: repeat(3, 1fr); } }
.stat-mini { text-align: center; padding: 1rem; border-radius: 0.5rem; background: var(--muted); }
.stat-mini .value { font-size: 1.875rem; font-weight: 800; margin-bottom: 0.25rem; color: var(--foreground); }
.stat-mini .value.primary { color: var(--primary); }
.stat-mini .value.accent { color: var(--accent); }
.stat-mini p { font-size: 0.875rem; color: var(--muted-foreground); }

.tag-list { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.removable-tag {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 0.75rem; background: var(--muted);
  color: var(--foreground); border-radius: 9999px; font-size: 0.875rem;
}
.removable-tag button { color: var(--muted-foreground); transition: color 0.2s; }
.removable-tag button:hover { color: var(--destructive); }

/* 404 */
.not-found {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--muted);
}
.not-found-inner { text-align: center; }
.not-found h1 { font-size: 4rem; font-weight: 800; margin-bottom: 1rem; color: var(--foreground); }
.not-found p { font-size: 1.25rem; color: var(--muted-foreground); margin-bottom: 1.5rem; }
.not-found a { color: var(--primary); text-decoration: underline; font-weight: 600; }

/* Utility icons / spinner */
.icon-sm { width: 1rem; height: 1rem; }
.icon-md { width: 1.25rem; height: 1.25rem; }
.icon-lg { width: 1.5rem; height: 1.5rem; }
.icon-xl { width: 2rem; height: 2rem; }
.spinner {
  border: 2px solid rgba(var(--primary-rgb), 0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  width: 1.25rem; height: 1.25rem;
  animation: spin 0.8s linear infinite;
}

/* Toast */
.toast-container { position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%); z-index: 100; pointer-events: none; display: flex; flex-direction: column; gap: 0.5rem; }
.toast {
  background: var(--secondary); color: var(--secondary-foreground);
  padding: 0.875rem 1.5rem; border-radius: 0.75rem;
  box-shadow: var(--shadow-elevation);
  font-size: 0.875rem; font-weight: 500;
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.3s, transform 0.3s; pointer-events: auto;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { background: var(--primary); color: var(--primary-foreground); }
.toast.error { background: var(--destructive); color: var(--destructive-foreground); }

/* Add-journey */
.add-journey-page .card { box-shadow: var(--shadow-elevation); }

/* ── Typing indicator (backend connection) ──────────── */
.msg-typing .msg-typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0;
}
.msg-typing .msg-typing-dots span {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--accent, #B85042);
  opacity: 0.4;
  animation: mujassd-typing 1.2s infinite ease-in-out;
}
.msg-typing .msg-typing-dots span:nth-child(2) { animation-delay: 0.18s; }
.msg-typing .msg-typing-dots span:nth-child(3) { animation-delay: 0.36s; }
@keyframes mujassd-typing {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30%           { opacity: 1;   transform: translateY(-3px); }
}

/* ============================================================
   LTR (English) direction support
   When i18n switches <html dir="ltr">, ensure the whole layout
   mirrors cleanly. Most rules already use logical properties or
   inherit `dir`; these handle the few elements that need a nudge.
   ============================================================ */
html[dir="ltr"] body { text-align: left; }
html[dir="ltr"] .principle,
html[dir="ltr"] .card-header,
html[dir="ltr"] .card-content,
html[dir="ltr"] .msg-expert-body,
html[dir="ltr"] .chat-input-area { text-align: left; }
html[dir="ltr"] .msg-header { flex-direction: row-reverse; }
/* Flip any explicitly right-aligned helper text */
html[dir="ltr"] [style*="text-align:right"],
html[dir="ltr"] [style*="text-align: right"] { text-align: left !important; }
