/**
 * PnielAcademy - Global Design System & Theme Engine
 * 5 Theme Families x 2 Color Modes = 10 Fully Defined Themes
 *
 * Controlled globally by /pniel_auth/data/settings.json (theme_family, color_mode)
 * Visitor light/dark preference persisted via 'pniel_site_mode'
 */

/* ==========================================================================
   Base Shared Tokens
   ========================================================================== */
:root {
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --header-height: 64px;
  --pniel-header-height: var(--header-height, 64px);
  --pniel-tutor-gap: 14px;

  --shadow-sm: 0 1px 3px rgba(11, 21, 40, 0.04), 0 1px 2px rgba(11, 21, 40, 0.02);
  --shadow-md: 0 6px 20px -3px rgba(11, 21, 40, 0.07), 0 2px 6px -1px rgba(11, 21, 40, 0.03);
  --shadow-lg: 0 14px 35px -5px rgba(11, 21, 40, 0.09), 0 4px 12px -2px rgba(11, 21, 40, 0.04);
  --shadow-hover: 0 20px 42px -6px rgba(11, 21, 40, 0.12), 0 8px 16px -3px rgba(11, 21, 40, 0.05);

  --font-heading: Arial, 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, 'Noto Sans Hebrew', sans-serif;
  --font-body: Arial, 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, 'Noto Sans Hebrew', sans-serif;

  /* Semantic status colors */
  --semantic-success: #10b981;
  --semantic-warning: #f59e0b;
  --semantic-error: #ef4444;
  --semantic-info: #0284c7;

  /* WhatsApp branding */
  --whatsapp-green: #25d366;
  --whatsapp-green-hover: #20bd5a;
  --whatsapp-green-glow: rgba(37, 211, 102, 0.35);

  /* Semantic cross-system bridges */
  --primary-color: var(--accent-primary);
  --primary-hover: var(--accent-dark);
  --accent-color: var(--gold-primary);
  --badge-bg: var(--accent-light);
  --badge-text: var(--accent-primary);
  --bg-surface: var(--bg-card);
  --bg-muted: var(--bg-subtle);
  --border-color: var(--border-card);
  --accent-hover: var(--accent-dark);
  --accent-soft: var(--accent-light);
  --shadow-soft: var(--shadow-sm);
  --shadow-card: var(--shadow-md);
  --accent-gold: var(--gold-primary);
  --accent-cyan-light: var(--accent-primary);
  --accent-primary-hover: var(--accent-dark);
}

/* ==========================================================================
   1. REGULAR - LIGHT (PREMIUM NAVY & GOLD)
   ========================================================================== */
:root,
html[data-theme="regular"][data-mode="light"],
html[data-theme="regular"]:not([data-mode="dark"]),
html[data-theme-family="regular"][data-theme-mode="light"],
html:not([data-theme]) {
  --bg-page: #f8fafc;
  --bg-subtle: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-alt: #f8fafc;
  --nav-bg: rgba(255, 255, 255, 0.94);
  --nav-border: rgba(15, 23, 42, 0.08);
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-faint: #94a3b8;
  --gold-primary: #b48418;
  --gold-deep: #855d08;
  --gold-light: #d4af37;
  --gold-badge-bg: #fefce8;
  --gold-badge-border: #fef08a;
  --gold-badge-text: #854d0e;
  --gold-glow: rgba(180, 132, 24, 0.06);
  --accent-primary: #0284c7;
  --accent-dark: #0369a1;
  --accent-glow: rgba(2, 132, 199, 0.12);
  --accent-light: #f0f9ff;
  --accent-border: #bae6fd;
  --border-subtle: #e2e8f0;
  --border-card: #e2e8f0;
  --border-gold-subtle: rgba(180, 132, 24, 0.25);
  --cta-bg: #ffffff;
  --testi-bg: #ffffff;
  --btn-primary-bg: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  --btn-primary-text: #ffffff;
  --glow-1-bg: radial-gradient(circle, rgba(180, 132, 24, 0.04), transparent 70%);
  --glow-2-bg: radial-gradient(circle, rgba(2, 132, 199, 0.04), transparent 70%);
  --primary-color: #0284c7;
  --primary-hover: #0369a1;
  --accent-color: #b48418;
  --badge-bg: #f0f9ff;
  --badge-text: #0369a1;
}

/* ==========================================================================
   2. REGULAR - DARK (DEEP NAVY & GOLD)
   ========================================================================== */
html[data-theme="regular"][data-mode="dark"],
html[data-theme-family="regular"][data-theme-mode="dark"],
html[data-mode="dark"]:not([data-theme="ocean"]):not([data-theme="silver"]):not([data-theme="emerald"]):not([data-theme="monochrome"]) {
  --bg-page: #070a12;
  --bg-subtle: #0d1424;
  --bg-card: rgba(15, 23, 40, 0.88);
  --bg-card-alt: #121c30;
  --nav-bg: rgba(13, 19, 34, 0.88);
  --nav-border: rgba(255, 255, 255, 0.08);
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-faint: #64748b;
  --gold-primary: #d4af37;
  --gold-deep: #ffd875;
  --gold-light: #fef08a;
  --gold-badge-bg: rgba(212, 175, 55, 0.12);
  --gold-badge-border: rgba(212, 175, 55, 0.38);
  --gold-badge-text: #fde047;
  --gold-glow: rgba(212, 175, 55, 0.28);
  --accent-primary: #0284c7;
  --accent-dark: #0369a1;
  --accent-glow: rgba(2, 132, 199, 0.38);
  --accent-light: rgba(2, 132, 199, 0.12);
  --accent-border: rgba(2, 132, 199, 0.38);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-card: rgba(255, 255, 255, 0.09);
  --border-gold-subtle: rgba(212, 175, 55, 0.38);
  --cta-bg: linear-gradient(145deg, #131c2f 0%, #0c1220 50%, #152238 100%);
  --testi-bg: linear-gradient(145deg, rgba(20, 28, 46, 0.94) 0%, rgba(13, 19, 32, 0.98) 100%);
  --btn-primary-bg: linear-gradient(135deg, #0ea5e9 0%, #0d9488 100%);
  --btn-primary-text: #ffffff;
  --glow-1-bg: radial-gradient(circle, rgba(212, 175, 55, 0.15), transparent 70%);
  --glow-2-bg: radial-gradient(circle, rgba(14, 165, 233, 0.15), transparent 70%);
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px -4px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 16px 36px -6px rgba(0, 0, 0, 0.75);
  --shadow-hover: 0 22px 48px -8px rgba(0, 0, 0, 0.85);
  --primary-color: #4a80c0;
  --primary-hover: #386aa0;
  --accent-color: #e5c158;
  --badge-bg: rgba(74, 128, 192, 0.15);
  --badge-text: #93c5fd;
}

/* ==========================================================================
   3. OCEAN - LIGHT (MARINE / TEAL / CYAN)
   ========================================================================== */
html[data-theme="ocean"][data-mode="light"],
html[data-theme="ocean"]:not([data-mode="dark"]),
html[data-theme-family="ocean"][data-theme-mode="light"] {
  --bg-page: #f4f7fa;
  --bg-subtle: #e9eff5;
  --bg-card: #ffffff;
  --bg-card-alt: #f1f6fa;
  --nav-bg: rgba(255, 255, 255, 0.94);
  --nav-border: rgba(14, 43, 64, 0.08);
  --text-primary: #0c2333;
  --text-secondary: #244156;
  --text-muted: #4f6b80;
  --text-faint: #8fa4b5;
  --gold-primary: #0284c7;
  --gold-deep: #0369a1;
  --gold-light: #38bdf8;
  --gold-badge-bg: #f0f7fb;
  --gold-badge-border: #d2e5f2;
  --gold-badge-text: #0369a1;
  --gold-glow: rgba(2, 132, 199, 0.06);
  --accent-primary: #0369a1;
  --accent-dark: #075985;
  --accent-glow: rgba(3, 105, 161, 0.12);
  --accent-light: #f0f7fb;
  --accent-border: #bae6fd;
  --border-subtle: #d8e3ec;
  --border-card: #d8e3ec;
  --border-gold-subtle: rgba(2, 132, 199, 0.2);
  --cta-bg: #ffffff;
  --testi-bg: #ffffff;
  --btn-primary-bg: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  --btn-primary-text: #ffffff;
  --glow-1-bg: radial-gradient(circle, rgba(2, 132, 199, 0.04), transparent 70%);
  --glow-2-bg: radial-gradient(circle, rgba(3, 105, 161, 0.03), transparent 70%);
  --primary-color: #0369a1;
  --primary-hover: #075985;
  --accent-color: #0284c7;
  --badge-bg: #f0f7fb;
  --badge-text: #0369a1;
}

/* ==========================================================================
   4. OCEAN - DARK (DEEP OCEAN / DARK TEAL / CYAN HIGHLIGHTS)
   ========================================================================== */
html[data-theme="ocean"][data-mode="dark"],
html[data-theme-family="ocean"][data-theme-mode="dark"] {
  --bg-page: #04131C;
  --bg-subtle: #081E2C;
  --bg-card: rgba(8, 30, 44, 0.92);
  --bg-card-alt: #0C283A;
  --nav-bg: rgba(6, 25, 38, 0.92);
  --nav-border: rgba(34, 211, 238, 0.15);
  --text-primary: #EAF7FF;
  --text-secondary: #B2EBF2;
  --text-muted: #80DEEA;
  --text-faint: #4DD0E1;
  --gold-primary: #22D3EE;
  --gold-deep: #38BDF8;
  --gold-light: #67E8F9;
  --gold-badge-bg: rgba(34, 211, 238, 0.12);
  --gold-badge-border: rgba(34, 211, 238, 0.35);
  --gold-badge-text: #67E8F9;
  --gold-glow: rgba(34, 211, 238, 0.25);
  --accent-primary: #06B6D4;
  --accent-dark: #0891B2;
  --accent-glow: rgba(6, 182, 212, 0.4);
  --accent-light: rgba(6, 182, 212, 0.15);
  --accent-border: rgba(6, 182, 212, 0.35);
  --border-subtle: rgba(34, 211, 238, 0.15);
  --border-card: rgba(34, 211, 238, 0.18);
  --border-gold-subtle: rgba(34, 211, 238, 0.35);
  --cta-bg: linear-gradient(145deg, #082435 0%, #04141E 50%, #0C3046 100%);
  --testi-bg: linear-gradient(145deg, rgba(8, 32, 48, 0.95) 0%, rgba(4, 20, 32, 0.98) 100%);
  --btn-primary-bg: linear-gradient(135deg, #06B6D4 0%, #0284C7 100%);
  --btn-primary-text: #FFFFFF;
  --glow-1-bg: radial-gradient(circle, rgba(6, 182, 212, 0.2), transparent 70%);
  --glow-2-bg: radial-gradient(circle, rgba(14, 165, 233, 0.2), transparent 70%);
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px -4px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 16px 36px -6px rgba(0, 0, 0, 0.75);
  --shadow-hover: 0 22px 48px -8px rgba(0, 0, 0, 0.85);
  --primary-color: #06B6D4;
  --primary-hover: #0891B2;
  --accent-color: #22D3EE;
  --badge-bg: rgba(6, 182, 212, 0.15);
  --badge-text: #67E8F9;
}

/* ==========================================================================
   5. SILVER - LIGHT (COOL GREY / GRAPHITE / METALLIC NEUTRAL)
   ========================================================================== */
html[data-theme="silver"][data-mode="light"],
html[data-theme="silver"]:not([data-mode="dark"]),
html[data-theme-family="silver"][data-theme-mode="light"] {
  --bg-page: #f8f9fa;
  --bg-subtle: #eff1f4;
  --bg-card: #ffffff;
  --bg-card-alt: #f3f4f6;
  --nav-bg: rgba(255, 255, 255, 0.94);
  --nav-border: rgba(30, 41, 59, 0.08);
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-faint: #94a3b8;
  --gold-primary: #475569;
  --gold-deep: #334155;
  --gold-light: #64748b;
  --gold-badge-bg: #f1f5f9;
  --gold-badge-border: #cbd5e1;
  --gold-badge-text: #334155;
  --gold-glow: rgba(71, 85, 105, 0.06);
  --accent-primary: #2563eb;
  --accent-dark: #1d4ed8;
  --accent-glow: rgba(37, 99, 235, 0.12);
  --accent-light: #eff6ff;
  --accent-border: #bfdbfe;
  --border-subtle: #e2e8f0;
  --border-card: #e2e8f0;
  --border-gold-subtle: rgba(71, 85, 105, 0.2);
  --cta-bg: #ffffff;
  --testi-bg: #ffffff;
  --btn-primary-bg: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  --btn-primary-text: #ffffff;
  --glow-1-bg: radial-gradient(circle, rgba(148, 163, 184, 0.04), transparent 70%);
  --glow-2-bg: radial-gradient(circle, rgba(37, 99, 235, 0.03), transparent 70%);
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --accent-color: #475569;
  --badge-bg: #eff6ff;
  --badge-text: #1d4ed8;
}

/* ==========================================================================
   6. SILVER - DARK (CHARCOAL / GRAPHITE / SILVER HIGHLIGHTS)
   ========================================================================== */
html[data-theme="silver"][data-mode="dark"],
html[data-theme-family="silver"][data-theme-mode="dark"] {
  --bg-page: #111315;
  --bg-subtle: #191C1F;
  --bg-card: rgba(28, 32, 36, 0.92);
  --bg-card-alt: #23272C;
  --nav-bg: rgba(20, 23, 26, 0.92);
  --nav-border: rgba(255, 255, 255, 0.1);
  --text-primary: #F3F4F6;
  --text-secondary: #E5E7EB;
  --text-muted: #9CA3AF;
  --text-faint: #6B7280;
  --gold-primary: #D1D5DB;
  --gold-deep: #E5E7EB;
  --gold-light: #F3F4F6;
  --gold-badge-bg: rgba(209, 213, 219, 0.1);
  --gold-badge-border: rgba(209, 213, 219, 0.3);
  --gold-badge-text: #E5E7EB;
  --gold-glow: rgba(209, 213, 219, 0.18);
  --accent-primary: #9CA3AF;
  --accent-dark: #6B7280;
  --accent-glow: rgba(156, 163, 175, 0.3);
  --accent-light: rgba(156, 163, 175, 0.1);
  --accent-border: rgba(156, 163, 175, 0.25);
  --border-subtle: rgba(255, 255, 255, 0.1);
  --border-card: rgba(255, 255, 255, 0.12);
  --border-gold-subtle: rgba(209, 213, 219, 0.25);
  --cta-bg: linear-gradient(145deg, #22262B 0%, #14171A 50%, #2A2F35 100%);
  --testi-bg: linear-gradient(145deg, rgba(30, 35, 40, 0.95) 0%, rgba(18, 21, 24, 0.98) 100%);
  --btn-primary-bg: linear-gradient(135deg, #4B5563 0%, #374151 100%);
  --btn-primary-text: #FFFFFF;
  --glow-1-bg: radial-gradient(circle, rgba(156, 163, 175, 0.12), transparent 70%);
  --glow-2-bg: radial-gradient(circle, rgba(209, 213, 219, 0.1), transparent 70%);
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px -4px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 16px 36px -6px rgba(0, 0, 0, 0.75);
  --shadow-hover: 0 22px 48px -8px rgba(0, 0, 0, 0.85);
  --primary-color: #9CA3AF;
  --primary-hover: #D1D5DB;
  --accent-color: #E5E7EB;
  --badge-bg: rgba(209, 213, 219, 0.15);
  --badge-text: #F3F4F6;
}

/* ==========================================================================
   7. EMERALD - LIGHT (PALE GREEN / EMERALD / FOREST ACCENTS)
   ========================================================================== */
html[data-theme="emerald"][data-mode="light"],
html[data-theme="emerald"]:not([data-mode="dark"]),
html[data-theme-family="emerald"][data-theme-mode="light"] {
  --bg-page: #f8faf9;
  --bg-subtle: #f0f4f2;
  --bg-card: #ffffff;
  --bg-card-alt: #f4f7f5;
  --nav-bg: rgba(255, 255, 255, 0.94);
  --nav-border: rgba(6, 44, 28, 0.08);
  --text-primary: #0c1f17;
  --text-secondary: #263e34;
  --text-muted: #526e62;
  --text-faint: #8fa89d;
  --gold-primary: #047857;
  --gold-deep: #065f46;
  --gold-light: #10b981;
  --gold-badge-bg: #f0fdf4;
  --gold-badge-border: #bbf7d0;
  --gold-badge-text: #047857;
  --gold-glow: rgba(4, 120, 87, 0.06);
  --accent-primary: #047857;
  --accent-dark: #065f46;
  --accent-glow: rgba(4, 120, 87, 0.12);
  --accent-light: #f0fdf4;
  --accent-border: #a7f3d0;
  --border-subtle: #e2e8e5;
  --border-card: #e2e8e5;
  --border-gold-subtle: rgba(4, 120, 87, 0.2);
  --cta-bg: #ffffff;
  --testi-bg: #ffffff;
  --btn-primary-bg: linear-gradient(135deg, #059669 0%, #047857 100%);
  --btn-primary-text: #ffffff;
  --glow-1-bg: radial-gradient(circle, rgba(5, 150, 105, 0.04), transparent 70%);
  --glow-2-bg: radial-gradient(circle, rgba(4, 120, 87, 0.03), transparent 70%);
  --primary-color: #047857;
  --primary-hover: #065f46;
  --accent-color: #047857;
  --badge-bg: #f0fdf4;
  --badge-text: #047857;
}

/* ==========================================================================
   8. EMERALD - DARK (DEEP FOREST / NEAR-BLACK GREEN / EMERALD HIGHLIGHTS)
   ========================================================================== */
html[data-theme="emerald"][data-mode="dark"],
html[data-theme-family="emerald"][data-theme-mode="dark"] {
  --bg-page: #03170E;
  --bg-subtle: #072418;
  --bg-card: rgba(8, 36, 24, 0.92);
  --bg-card-alt: #0C3220;
  --nav-bg: rgba(5, 26, 17, 0.92);
  --nav-border: rgba(16, 185, 129, 0.16);
  --text-primary: #ECFDF5;
  --text-secondary: #D1FAE5;
  --text-muted: #A7F3D0;
  --text-faint: #6EE7B7;
  --gold-primary: #10B981;
  --gold-deep: #34D399;
  --gold-light: #6EE7B7;
  --gold-badge-bg: rgba(16, 185, 129, 0.12);
  --gold-badge-border: rgba(16, 185, 129, 0.35);
  --gold-badge-text: #6EE7B7;
  --gold-glow: rgba(16, 185, 129, 0.25);
  --accent-primary: #059669;
  --accent-dark: #047857;
  --accent-glow: rgba(16, 185, 129, 0.4);
  --accent-light: rgba(16, 185, 129, 0.15);
  --accent-border: rgba(16, 185, 129, 0.35);
  --border-subtle: rgba(16, 185, 129, 0.16);
  --border-card: rgba(16, 185, 129, 0.2);
  --border-gold-subtle: rgba(16, 185, 129, 0.35);
  --cta-bg: linear-gradient(145deg, #092C1D 0%, #03170E 50%, #0E3825 100%);
  --testi-bg: linear-gradient(145deg, rgba(8, 38, 26, 0.95) 0%, rgba(4, 22, 14, 0.98) 100%);
  --btn-primary-bg: linear-gradient(135deg, #10B981 0%, #059669 100%);
  --btn-primary-text: #FFFFFF;
  --glow-1-bg: radial-gradient(circle, rgba(16, 185, 129, 0.2), transparent 70%);
  --glow-2-bg: radial-gradient(circle, rgba(52, 211, 153, 0.15), transparent 70%);
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px -4px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 16px 36px -6px rgba(0, 0, 0, 0.75);
  --shadow-hover: 0 22px 48px -8px rgba(0, 0, 0, 0.85);
  --primary-color: #10B981;
  --primary-hover: #34D399;
  --accent-color: #6EE7B7;
  --badge-bg: rgba(16, 185, 129, 0.15);
  --badge-text: #A7F3D0;
}

/* ==========================================================================
   9. MONOCHROME - LIGHT (STRICT OFF-WHITE / CHARCOAL / BLACK)
   ========================================================================== */
html[data-theme="monochrome"][data-mode="light"],
html[data-theme="monochrome"]:not([data-mode="dark"]),
html[data-theme-family="monochrome"][data-theme-mode="light"] {
  --bg-page: #f9fafb;
  --bg-subtle: #f3f4f6;
  --bg-card: #ffffff;
  --bg-card-alt: #f3f4f6;
  --nav-bg: rgba(255, 255, 255, 0.94);
  --nav-border: rgba(15, 23, 42, 0.08);
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-faint: #94a3b8;
  --gold-primary: #1e293b;
  --gold-deep: #0f172a;
  --gold-light: #475569;
  --gold-badge-bg: #f1f5f9;
  --gold-badge-border: #cbd5e1;
  --gold-badge-text: #0f172a;
  --gold-glow: rgba(15, 23, 42, 0.04);
  --accent-primary: #0f172a;
  --accent-dark: #020617;
  --accent-glow: rgba(15, 23, 42, 0.08);
  --accent-light: #f1f5f9;
  --accent-border: #cbd5e1;
  --border-subtle: #e2e8f0;
  --border-card: #e2e8f0;
  --border-gold-subtle: rgba(15, 23, 42, 0.18);
  --cta-bg: #ffffff;
  --testi-bg: #ffffff;
  --btn-primary-bg: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  --btn-primary-text: #ffffff;
  --glow-1-bg: radial-gradient(circle, rgba(15, 23, 42, 0.03), transparent 70%);
  --glow-2-bg: radial-gradient(circle, rgba(15, 23, 42, 0.02), transparent 70%);
  --primary-color: #0f172a;
  --primary-hover: #020617;
  --accent-color: #334155;
  --badge-bg: #f1f5f9;
  --badge-text: #0f172a;
}

/* ==========================================================================
   10. MONOCHROME - DARK (STRICT BLACK / CHARCOAL / WHITE HIGHLIGHTS)
   ========================================================================== */
html[data-theme="monochrome"][data-mode="dark"],
html[data-theme-family="monochrome"][data-theme-mode="dark"] {
  --bg-page: #09090B;
  --bg-subtle: #141416;
  --bg-card: rgba(24, 24, 27, 0.92);
  --bg-card-alt: #1C1C20;
  --nav-bg: rgba(13, 13, 15, 0.92);
  --nav-border: rgba(255, 255, 255, 0.1);
  --text-primary: #FAFAFA;
  --text-secondary: #E4E4E7;
  --text-muted: #A1A1AA;
  --text-faint: #71717A;
  --gold-primary: #E4E4E7;
  --gold-deep: #FFFFFF;
  --gold-light: #F4F4F5;
  --gold-badge-bg: rgba(255, 255, 255, 0.08);
  --gold-badge-border: rgba(255, 255, 255, 0.2);
  --gold-badge-text: #FAFAFA;
  --gold-glow: rgba(255, 255, 255, 0.15);
  --accent-primary: #E4E4E7;
  --accent-dark: #D4D4D8;
  --accent-glow: rgba(255, 255, 255, 0.2);
  --accent-light: rgba(255, 255, 255, 0.1);
  --accent-border: rgba(255, 255, 255, 0.25);
  --border-subtle: rgba(255, 255, 255, 0.1);
  --border-card: rgba(255, 255, 255, 0.12);
  --border-gold-subtle: rgba(255, 255, 255, 0.22);
  --cta-bg: linear-gradient(145deg, #1C1C20 0%, #0E0E10 50%, #222226 100%);
  --testi-bg: linear-gradient(145deg, rgba(28, 28, 32, 0.95) 0%, rgba(14, 14, 16, 0.98) 100%);
  --btn-primary-bg: linear-gradient(135deg, #27272A 0%, #18181B 100%);
  --btn-primary-text: #FFFFFF;
  --glow-1-bg: radial-gradient(circle, rgba(255, 255, 255, 0.06), transparent 70%);
  --glow-2-bg: radial-gradient(circle, rgba(255, 255, 255, 0.04), transparent 70%);
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px -4px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 16px 36px -6px rgba(0, 0, 0, 0.75);
  --shadow-hover: 0 22px 48px -8px rgba(0, 0, 0, 0.85);
  --primary-color: #E4E4E7;
  --primary-hover: #FFFFFF;
  --accent-color: #FAFAFA;
  --badge-bg: rgba(255, 255, 255, 0.12);
  --badge-text: #FAFAFA;
}

/* ==========================================================================
   Global Keyboard Focus Styling (All Theme Families & Modes)
   ========================================================================== */
:focus-visible {
  outline: 2px solid var(--accent-primary, #0284c7);
  outline-offset: 3px;
}

/* ==========================================================================
   Global Unified Site Header (Locked Dimensions & Stability)
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  height: var(--header-height, 64px);
  min-height: var(--header-height, 64px);
  max-height: var(--header-height, 64px);
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--nav-border);
  transition: background-color 0.2s ease, border-color 0.2s ease;
  box-sizing: border-box;
}

.site-header.menu-open {
  background: var(--bg-page) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-bottom: 1px solid var(--border-card);
}

.site-header .container,
.site-header .header-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: nowrap;
  box-sizing: border-box;
}

.site-header .brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  flex-shrink: 0;
  height: 100%;
}

.site-header .brand-avatar {
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-color);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
  display: block;
}

.site-header .brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.15;
}

.site-header .brand-name {
  font-family: var(--font-heading);
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.site-header .brand-tagline {
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.2;
}

@media (max-width: 640px) {
  .site-header .brand-tagline {
    display: none;
  }
}

.site-header .main-nav {
  display: block;
}

.site-header .nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-header .nav-links li {
  list-style: none;
}

.site-header .nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.2;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease, background-color 0.15s ease;
  display: inline-block;
  white-space: nowrap;
}

.site-header .nav-links a:hover {
  color: var(--text-primary);
  background: var(--bg-subtle);
}

.site-header .nav-links a.active {
  color: var(--primary-color);
  background: var(--badge-bg);
  font-weight: 700;
}

.site-header .header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  height: 100%;
  flex-wrap: nowrap;
}

.site-header .header-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--whatsapp-green);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.88rem;
  line-height: 1;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  box-shadow: 0 2px 8px rgba(37, 211, 102, 0.25);
  box-sizing: border-box;
  height: 38px;
}

.site-header .header-cta-btn:hover {
  background: var(--whatsapp-green-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px var(--whatsapp-green-glow);
  color: #ffffff;
}

.site-header .header-cta-btn:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* =========================================================================
   DETERMINISTIC FIXED-WIDTH AUTH SLOT (ZERO LAYOUT SHIFT)
   Desktop (>960px): 135px fixed width slot
   Mobile (<=960px): 38px fixed width slot
   Mobile (<=340px): 36px fixed width slot
   Identical dimensions in ALL states: loading, anonymous, authenticated.
   ========================================================================= */

.header-auth-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 135px;
  min-width: 135px;
  max-width: 135px;
  height: 38px;
  min-height: 38px;
  max-height: 38px;
  flex-shrink: 0;
  box-sizing: border-box;
}

/* Base states of child controls inside the fixed slot */
.header-auth-placeholder,
.header-auth-btn,
.header-user-badge {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1), visibility 100ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* 1. LOADING: Stable neutral placeholder visible immediately from first paint */
.header-auth-wrap[data-auth-state="loading"] .header-auth-placeholder {
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: none !important;
}
.header-auth-wrap[data-auth-state="loading"] .header-auth-btn,
.header-auth-wrap[data-auth-state="loading"] .header-user-badge {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* 2. ANONYMOUS: Login button visible, placeholder & user badge hidden */
.header-auth-wrap[data-auth-state="anonymous"] .header-auth-placeholder {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.header-auth-wrap[data-auth-state="anonymous"] .header-auth-btn {
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}
.header-auth-wrap[data-auth-state="anonymous"] .header-user-badge {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* 3. AUTHENTICATED: User badge visible, placeholder & login button hidden */
.header-auth-wrap[data-auth-state="authenticated"] .header-auth-placeholder {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.header-auth-wrap[data-auth-state="authenticated"] .header-user-badge {
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}
.header-auth-wrap[data-auth-state="authenticated"] .header-auth-btn {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Mobile Drawer Auth Link */
.mobile-auth-item[data-auth-state="loading"] {
  opacity: 0.6;
  pointer-events: none;
}
.mobile-auth-item[data-auth-state="anonymous"],
.mobile-auth-item[data-auth-state="authenticated"] {
  display: flex !important;
  opacity: 1;
  pointer-events: auto;
}

/* Desktop Styles: Neutral Loading Placeholder */
.header-auth-placeholder {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-card);
  background: var(--bg-card);
  white-space: nowrap;
  line-height: 1.2;
  gap: 8px;
  cursor: pointer;
}
.header-auth-placeholder:hover {
  background: var(--bg-subtle);
  border-color: var(--primary-color);
}
.header-auth-placeholder-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
}
.header-auth-placeholder-icon svg {
  display: inline-block;
  width: 18px;
  height: 18px;
}
.header-auth-placeholder-skeleton {
  display: inline-block;
  width: 54px;
  height: 9px;
  border-radius: 4px;
  background: var(--border-subtle);
  opacity: 0.85;
  flex-shrink: 0;
}
:is([data-mode="dark"], [data-theme-mode="dark"], [data-theme="dark"]) .header-auth-placeholder-skeleton {
  background: rgba(255, 255, 255, 0.14);
}

/* Desktop Styles: Login Button */
.header-auth-btn {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-card);
  background: var(--bg-card);
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
  white-space: nowrap;
  line-height: 1.2;
}
.header-auth-btn:hover {
  color: var(--primary-color);
  border-color: var(--primary-color);
  background: var(--bg-subtle);
}
.header-auth-btn:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}
.header-auth-login-icon {
  display: none;
}

/* Desktop Styles: Authenticated User Badge */
.header-user-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  padding: 4px 10px 4px 5px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-card);
  background: var(--bg-card);
  transition: border-color 0.15s ease, background-color 0.15s ease;
  white-space: nowrap;
  line-height: 1.2;
  overflow: hidden;
}
.header-user-badge:hover {
  border-color: var(--primary-color);
  background: var(--bg-subtle);
}
.header-user-badge:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}
.header-user-avatar {
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--badge-bg);
  color: var(--badge-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}
.header-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.header-user-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1 1 auto;
  min-width: 0;
}

@media (max-width: 768px) {
  .site-header .header-cta-btn {
    display: none;
  }
  .site-header .header-inner {
    padding: 0 12px;
    gap: 8px;
  }
  .site-header .header-actions {
    gap: 8px;
  }
  .site-header .brand-logo {
    gap: 8px;
  }
  .site-header .brand-name {
    font-size: 1.05rem;
  }
  .site-header .theme-toggle-btn,
  .site-header .mobile-menu-btn,
  .header-auth-wrap {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    max-width: 38px !important;
    max-height: 38px !important;
  }
  .header-auth-btn {
    padding: 0;
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: var(--radius-full);
  }
  .header-auth-btn span:not(.header-auth-login-icon) {
    display: none;
  }
  .header-auth-login-icon {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }
  .header-user-badge {
    padding: 0;
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: var(--radius-full);
    justify-content: center;
  }
  .header-user-label {
    display: none;
  }
}

@media (max-width: 340px) {
  .site-header .header-inner {
    padding: 0 8px;
    gap: 6px;
  }
  .site-header .header-actions {
    gap: 6px;
  }
  .site-header .brand-logo {
    gap: 6px;
  }
  .site-header .brand-name {
    font-size: 0.95rem;
  }
  .site-header .brand-avatar {
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
  }
  .site-header .theme-toggle-btn,
  .site-header .mobile-menu-btn,
  .header-auth-wrap {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    max-width: 36px !important;
    max-height: 36px !important;
  }
}

.site-header .theme-toggle-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-full);
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  cursor: pointer;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  box-sizing: border-box;
}

.site-header .theme-toggle-btn:hover {
  background: var(--bg-subtle);
  border-color: var(--primary-color);
  transform: scale(1.05);
}

.site-header .theme-toggle-btn:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.site-header .mobile-menu-btn {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 8px;
  cursor: pointer;
  color: var(--text-primary);
  flex-direction: column;
  justify-content: space-around;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  flex-shrink: 0;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  position: relative;
  z-index: 10001;
  box-sizing: border-box;
}

.site-header .mobile-menu-btn:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.site-header .mobile-menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: currentColor;
  border-radius: 2px;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
  transform-origin: center;
}

.site-header .mobile-menu-btn.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-header .mobile-menu-btn.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.site-header .mobile-menu-btn.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 1120px) {
  .site-header .nav-links a {
    padding: 6px 10px;
    font-size: 0.88rem;
  }
  .site-header .brand-tagline {
    font-size: 0.70rem;
  }
}

@media (max-width: 960px) {
  .site-header .main-nav {
    display: none;
  }
  .site-header .mobile-menu-btn {
    display: flex;
  }

  /* Mobile Direct Account Control: Fixed 38px circle in top header */
  .header-auth-wrap {
    display: inline-flex !important;
    width: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    border-radius: 50% !important;
    padding: 0 !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden;
  }

  /* Hide textual labels and skeleton on mobile */
  .header-auth-wrap .header-auth-btn-text,
  .header-auth-wrap .header-user-label,
  .header-auth-wrap .header-auth-placeholder-skeleton {
    display: none !important;
  }

  /* Show circular user icon for placeholder and anonymous */
  .header-auth-wrap .header-auth-login-icon,
  .header-auth-wrap .header-auth-placeholder-icon {
    display: flex !important;
    width: 18px !important;
    height: 18px !important;
    margin: 0 !important;
    color: var(--text-primary) !important;
  }

  /* Placeholder on mobile: round 38px circle matching anonymous */
  .header-auth-wrap .header-auth-placeholder {
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: var(--bg-card) !important;
    border: 1px solid var(--border-subtle) !important;
    box-sizing: border-box !important;
    color: var(--text-primary) !important;
  }

  /* Anonymous button styling: round 38px circle */
  .header-auth-wrap .header-auth-btn {
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: var(--bg-card) !important;
    border: 1px solid var(--border-subtle) !important;
    box-sizing: border-box !important;
    transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
  }
  .header-auth-wrap .header-auth-btn:hover {
    background: var(--bg-subtle) !important;
    border-color: var(--primary-color) !important;
  }

  /* Authenticated button styling: round 38px circle */
  .header-auth-wrap .header-user-badge {
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: var(--bg-card) !important;
    border: 1px solid var(--border-subtle) !important;
    box-sizing: border-box !important;
    gap: 0 !important;
    overflow: hidden !important;
    transition: border-color 0.15s ease, background-color 0.15s ease;
  }
  .header-auth-wrap .header-user-badge:hover {
    border-color: var(--primary-color) !important;
  }

  /* Avatar fills the 38px circle cleanly */
  .header-auth-wrap .header-user-avatar {
    width: 100% !important;
    height: 100% !important;
    min-width: 100% !important;
    min-height: 100% !important;
    border-radius: 50% !important;
    font-size: 0.95rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .header-auth-wrap .header-user-avatar img {
    width: 100% !important;
    height: 100% !important;
    border-radius: 50% !important;
    object-fit: cover !important;
  }
}

/* ==========================================================================
   Full-Viewport Mobile Navigation Drawer & Background Scroll Lock
   ========================================================================== */
.mobile-nav-drawer {
  display: none !important;
  position: fixed;
  top: var(--header-height, 64px);
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  width: 100%;
  height: calc(100vh - var(--header-height, 64px));
  height: calc(100dvh - var(--header-height, 64px));
  background: var(--bg-page);
  border-top: none;
  z-index: 999;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px 20px max(32px, env(safe-area-inset-bottom, 32px));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  box-sizing: border-box;
}

.mobile-nav-drawer.open {
  display: flex !important;
  animation: mobileDrawerFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes mobileDrawerFadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.mobile-drawer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
  flex-shrink: 0;
}

.mobile-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-primary);
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav-item:hover,
.mobile-nav-item:focus-visible {
  background: var(--bg-subtle);
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateX(-4px);
}

.mobile-nav-item.active {
  background: var(--badge-bg);
  border-color: var(--primary-color);
  color: var(--primary-color);
  font-weight: 800;
}

.mobile-nav-arrow {
  color: var(--text-muted);
  font-size: 1rem;
  transition: transform 0.2s ease, color 0.2s ease;
}

.mobile-nav-item:hover .mobile-nav-arrow {
  transform: translateX(-4px);
  color: var(--primary-color);
}

.mobile-drawer-footer {
  margin-top: auto;
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.mobile-drawer-cta-btn {
  width: 100%;
  justify-content: center;
  padding: 14px 20px;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.3);
}

.mobile-drawer-contact-info {
  display: flex;
  justify-content: center;
  align-items: center;
}

.mobile-drawer-phone {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  transition: all 0.2s ease;
}

.mobile-drawer-phone:hover {
  color: var(--text-primary);
  border-color: var(--primary-color);
}

@media (max-width: 360px) {
  .mobile-nav-drawer {
    padding-left: 14px;
    padding-right: 14px;
  }
  .mobile-drawer-cta-btn {
    padding: 12px 14px;
    font-size: 0.94rem;
    gap: 8px;
  }
  .mobile-nav-item {
    padding: 12px 14px;
    font-size: 1.05rem;
  }
}

html.mobile-menu-open,
body.mobile-menu-open {
  overflow: hidden !important;
  overscroll-behavior: none !important;
  touch-action: none !important;
}

/* Hide floating widgets & privacy banner when mobile menu is open */
html.mobile-menu-open .floating-wa-wrap,
body.mobile-menu-open .floating-wa-wrap,
html.mobile-menu-open .a11y-floating-btn,
body.mobile-menu-open .a11y-floating-btn,
html.mobile-menu-open .privacy-banner,
body.mobile-menu-open .privacy-banner,
html.mobile-menu-open .privacy-modal-backdrop,
body.mobile-menu-open .privacy-modal-backdrop,
html.mobile-menu-open .pniel-ai-trigger,
body.mobile-menu-open .pniel-ai-trigger,
html.mobile-menu-open .pniel-ai-lightweight-card,
body.mobile-menu-open .pniel-ai-lightweight-card,
html.mobile-menu-open .pniel-ai-workspace,
body.mobile-menu-open .pniel-ai-workspace {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* ==========================================================================
   Skip Links & Main Content Scroll Margin
   ========================================================================== */
.skip-link {
  position: absolute;
  top: -120px;
  right: 16px;
  background: #073845;
  color: #ffffff;
  border: 2px solid #25d9e8;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  z-index: 99999;
  text-decoration: none;
  box-shadow: var(--shadow-md);
  transition: top 0.2s ease;
}

.skip-link:focus,
.skip-link:focus-visible {
  top: 16px;
  color: #ffffff !important;
  background: #073845 !important;
  border-color: #25d9e8 !important;
  outline: 3px solid #25d9e8 !important;
  outline-offset: 2px !important;
}

.skip-link.skip-a11y:focus,
.skip-link.skip-a11y:focus-visible {
  top: 16px;
  right: 175px;
  color: #ffffff !important;
  background: #073845 !important;
  border-color: #25d9e8 !important;
  outline: 3px solid #25d9e8 !important;
  outline-offset: 2px !important;
}

#main-content {
  scroll-margin-top: calc(var(--header-height, 64px) + 16px);
}

#main-content:focus {
  outline: none;
}

/* =============================================================================
   Shared Global Privacy Consent Banner & Modal Styles
   ============================================================================= */
.privacy-banner {
  position: fixed;
  bottom: 24px;
  right: 24px;
  max-width: 440px;
  width: calc(100% - 48px);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.04);
  padding: 20px;
  z-index: 98;
  direction: rtl;
  text-align: right;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  box-sizing: border-box;
}
.privacy-banner.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  z-index: 1000000;
}
:is([data-mode="dark"], [data-theme-mode="dark"], [data-theme="dark"]) .privacy-banner {
  background: var(--bg-card);
  border-color: var(--border-subtle);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}
.privacy-banner-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--text-primary);
}
.privacy-icon {
  flex-shrink: 0;
  color: var(--accent-primary);
}
.privacy-banner-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
  font-family: var(--font-heading);
}
.privacy-banner-text {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0 0 16px 0;
}
:is([data-mode="dark"], [data-theme-mode="dark"], [data-theme="dark"]) .privacy-banner-text {
  color: #cbd5e1;
}
.privacy-banner-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.privacy-btn {
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  min-height: 44px;
  min-width: 44px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
  box-sizing: border-box;
}
.privacy-btn:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}
.privacy-btn-accept {
  background: var(--accent-primary);
  color: #ffffff;
}
.privacy-btn-accept:hover {
  background: var(--accent-primary-hover, #1d4ed8);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}
.privacy-btn-reject {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}
.privacy-btn-reject:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
  border-color: var(--text-muted);
}
:is([data-mode="dark"], [data-theme-mode="dark"], [data-theme="dark"]) .privacy-btn-reject {
  border-color: rgba(255, 255, 255, 0.16);
  color: #cbd5e1;
}
:is([data-mode="dark"], [data-theme-mode="dark"], [data-theme="dark"]) .privacy-btn-reject:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}
.privacy-btn-info {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 500;
  min-height: 44px;
  min-width: 44px;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
  margin-right: auto;
  padding: 10px 12px;
  transition: color 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.privacy-btn-info:hover {
  color: var(--accent-primary);
}
.privacy-btn-info:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}
:is([data-mode="dark"], [data-theme-mode="dark"], [data-theme="dark"]) .privacy-btn-info {
  color: #94a3b8;
}
:is([data-mode="dark"], [data-theme-mode="dark"], [data-theme="dark"]) .privacy-btn-info:hover {
  color: #60a5fa;
}

@media (max-width: 768px) {
  .privacy-banner {
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    right: 12px;
    left: 12px;
    width: calc(100% - 24px);
    max-width: calc(100% - 24px);
    margin: 0 auto;
    padding: 16px;
    box-sizing: border-box;
  }
  body:has(.mobile-bottom-bar) .privacy-banner,
  .mobile-bottom-bar ~ .privacy-banner {
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  }
  .privacy-banner.active {
    z-index: 1000000;
  }
  html.privacy-banner-open .floating-wa-wrap,
  body.privacy-banner-open .floating-wa-wrap,
  html:has(.privacy-banner.active) .floating-wa-wrap,
  html.privacy-banner-open .floating-wa-btn,
  body.privacy-banner-open .floating-wa-btn,
  html:has(.privacy-banner.active) .floating-wa-btn {
    bottom: calc(240px + env(safe-area-inset-bottom, 0px)) !important;
    transition: bottom 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .privacy-banner-actions {
    gap: 8px;
    justify-content: flex-start;
  }
  .privacy-btn {
    min-height: 44px;
    min-width: 44px;
    padding: 10px 14px;
  }
  .privacy-btn-info {
    min-height: 44px;
    min-width: 44px;
    padding: 10px 10px;
    margin-right: 0;
    margin-inline-start: 0;
  }
}

@media (min-width: 769px) {
  html.privacy-banner-open .floating-wa-btn,
  body.privacy-banner-open .floating-wa-btn,
  html:has(.privacy-banner.active) .floating-wa-btn,
  html.privacy-banner-open .floating-wa-wrap,
  body.privacy-banner-open .floating-wa-wrap,
  html:has(.privacy-banner.active) .floating-wa-wrap {
    bottom: calc(200px + env(safe-area-inset-bottom, 0px)) !important;
    transition: bottom 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }
}

/* Privacy Information Modal */
.privacy-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(7, 10, 18, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 999995;
  overscroll-behavior: contain;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  direction: rtl;
}
.privacy-modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}
.privacy-modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 24px;
  max-width: 520px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  width: 100%;
  text-align: right;
  outline: none;
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overscroll-behavior: contain;
  box-sizing: border-box;
}
.privacy-modal-backdrop.active .privacy-modal-card {
  transform: scale(1);
}
:is([data-mode="dark"], [data-theme-mode="dark"], [data-theme="dark"]) .privacy-modal-card {
  background: var(--bg-card);
  border-color: var(--border-subtle);
}
.privacy-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}
:is([data-mode="dark"], [data-theme-mode="dark"], [data-theme="dark"]) .privacy-modal-header {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
.privacy-modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.privacy-modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
  font-family: var(--font-heading);
}
.privacy-modal-close-icon {
  background: none;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, background-color 0.2s ease;
}
.privacy-modal-close-icon:hover {
  color: var(--text-primary);
  background: var(--bg-subtle);
}
.privacy-modal-close-icon:focus-visible {
  outline: 2px solid var(--accent-primary);
}
.privacy-modal-body {
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--text-secondary);
  margin-bottom: 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.privacy-modal-body p {
  margin-bottom: 12px;
}
.privacy-modal-body p:last-child {
  margin-bottom: 0;
}
:is([data-mode="dark"], [data-theme-mode="dark"], [data-theme="dark"]) .privacy-modal-body {
  color: #cbd5e1;
}
.privacy-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* =============================================================================
   Permanent Footer Privacy Settings Link
   ============================================================================= */
.footer-privacy-btn {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  transition: color 0.15s ease;
  line-height: inherit;
  vertical-align: baseline;
}
.footer-privacy-btn:hover {
  color: var(--primary-color, var(--accent-primary));
  text-decoration: underline;
}
.footer-privacy-btn:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
.footer-privacy-icon {
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
  color: inherit;
}

/* Universal suppression of WhatsApp mobile bottom bar & floating button across all pages */
.mobile-bottom-bar,
.mobile-wa-btn,
.floating-wa-wrap,
.floating-wa-btn,
#floatingWaBtn,
a[href*="wa.me"].floating-wa-btn {
  display: none !important;
}


/* Shared icon-only dismiss controls: precise X, quiet circular hover, accessible hit area. */
body button:is(.pniel-ai-close-btn, .btn-close-ai-teach, .pniel-lb-close, .drawer-close-btn, .a11y-close-btn, .privacy-modal-close-icon, .checkout-dialog-close, [data-photo="close"], [data-permission="close"], [data-settings="close"]) {
  position:relative; box-sizing:border-box; display:inline-flex; align-items:center; justify-content:center;
  width:36px !important; height:36px !important; min-width:36px !important; min-height:36px !important;
  padding:0 !important; border:0 !important; border-radius:50% !important; background:transparent !important;
  color:var(--text-secondary,#475569) !important; box-shadow:none !important; font-size:0 !important; line-height:1;
  cursor:pointer; flex-shrink:0; transition:background-color .15s ease,color .15s ease;
}
body button:is(.pniel-ai-close-btn, .btn-close-ai-teach, .pniel-lb-close, .drawer-close-btn, .a11y-close-btn, .privacy-modal-close-icon, .checkout-dialog-close, [data-photo="close"], [data-permission="close"], [data-settings="close"]) > svg { display:none; }
body button:is(.pniel-ai-close-btn, .btn-close-ai-teach, .pniel-lb-close, .drawer-close-btn, .a11y-close-btn, .privacy-modal-close-icon, .checkout-dialog-close, [data-photo="close"], [data-permission="close"], [data-settings="close"])::before, body button:is(.pniel-ai-close-btn, .btn-close-ai-teach, .pniel-lb-close, .drawer-close-btn, .a11y-close-btn, .privacy-modal-close-icon, .checkout-dialog-close, [data-photo="close"], [data-permission="close"], [data-settings="close"])::after {
  content:""; position:absolute; inset:auto; top:50%; left:50%; width:16px; height:1.8px;
  border-radius:2px; background:currentColor; pointer-events:none;
}
body button:is(.pniel-ai-close-btn, .btn-close-ai-teach, .pniel-lb-close, .drawer-close-btn, .a11y-close-btn, .privacy-modal-close-icon, .checkout-dialog-close, [data-photo="close"], [data-permission="close"], [data-settings="close"])::before { transform:translate(-50%,-50%) rotate(45deg); }
body button:is(.pniel-ai-close-btn, .btn-close-ai-teach, .pniel-lb-close, .drawer-close-btn, .a11y-close-btn, .privacy-modal-close-icon, .checkout-dialog-close, [data-photo="close"], [data-permission="close"], [data-settings="close"])::after { transform:translate(-50%,-50%) rotate(-45deg); }
body button:is(.pniel-ai-close-btn, .btn-close-ai-teach, .pniel-lb-close, .drawer-close-btn, .a11y-close-btn, .privacy-modal-close-icon, .checkout-dialog-close, [data-photo="close"], [data-permission="close"], [data-settings="close"]):hover { background:var(--bg-subtle,rgba(100,116,139,.12)) !important; color:var(--text-primary,#0f172a) !important; }
body button:is(.pniel-ai-close-btn, .btn-close-ai-teach, .pniel-lb-close, .drawer-close-btn, .a11y-close-btn, .privacy-modal-close-icon, .checkout-dialog-close, [data-photo="close"], [data-permission="close"], [data-settings="close"]):focus-visible { outline:2px solid var(--primary-color,#2563eb); outline-offset:2px; }
@media (max-width:1024px) {
  body button:is(.pniel-ai-close-btn, .btn-close-ai-teach, .pniel-lb-close, .drawer-close-btn, .a11y-close-btn, .privacy-modal-close-icon, .checkout-dialog-close, [data-photo="close"], [data-permission="close"], [data-settings="close"]) { width:44px !important; height:44px !important; min-width:44px !important; min-height:44px !important; }
}
@media (prefers-reduced-motion:reduce) { body button:is(.pniel-ai-close-btn, .btn-close-ai-teach, .pniel-lb-close, .drawer-close-btn, .a11y-close-btn, .privacy-modal-close-icon, .checkout-dialog-close, [data-photo="close"], [data-permission="close"], [data-settings="close"]) { transition:none; } }
