/* Corex Signal AI - Main Stylesheet
    Author: Gemini AI (for Professional Project)
*/

/* --- 1. Root Variables & Base Setup --- */
:root {
    /* === WALL STREET COMMAND CENTER PALETTE === */
    --color-primary: #00ff9d;           /* Neon Emerald (Profit/Buy) */
    --color-primary-dark: #00c77a;
    --color-primary-glow: rgba(0, 255, 157, 0.15);
    --color-primary-intense: rgba(0, 255, 157, 0.4);
    --color-danger: #ff2d55;            /* Crimson Red (Risk/Sell) */
    --color-danger-glow: rgba(255, 45, 85, 0.15);
    --color-warning: #ffaa00;           /* Amber Warning */
    --color-accent-blue: #00b4ff;       /* Data Blue */
    --color-accent-purple: #a855f7;     /* AI Purple */

    /* === DEEP SPACE BLACKS === */
    --color-bg-dark: #050811;           /* Abyss Black */
    --color-bg-medium: #0a0f1e;        /* Deep Space */
    --color-bg-light: #0f1629;          /* Card Surface */
    --color-bg-card: rgba(15, 22, 41, 0.6); /* Glassmorphism Base */
    --color-bg-glass: rgba(15, 22, 41, 0.4); /* Glass Panel */

    /* === BORDERS & GLASS === */
    --color-border: rgba(42, 52, 78, 0.5);     /* Subtle Glass Border */
    --color-border-glow: rgba(0, 255, 157, 0.2); /* Neon Border Hover */
    --glass-blur: 20px;
    --glass-border: 1px solid rgba(255, 255, 255, 0.06);

    /* === TEXT === */
    --color-text-primary: #f0f4f8;      /* Off-White */
    --color-text-secondary: #7a8ba7;    /* Muted Steel */
    --color-text-dim: #4a5568;          /* Dim Labels */
    --color-popular-badge: #ff2d55;

    /* === FONTS === */
    --font-family: 'Inter', 'Vazirmatn', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --font-display: 'Orbitron', 'Inter', sans-serif;
    --font-rtl: 'Vazirmatn', sans-serif;

    /* === LAYOUT === */
    --header-height: 72px;
    --border-radius: 16px;
    --border-radius-sm: 8px;
    --border-radius-lg: 24px;
    --transition-speed: 0.3s ease;
    --transition-smooth: 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);

    /* === SHADOWS & GLOWS === */
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-elevated: 0 20px 60px rgba(0, 0, 0, 0.5);
    --glow-primary: 0 0 20px rgba(0, 255, 157, 0.3), 0 0 60px rgba(0, 255, 157, 0.1);
    --glow-danger: 0 0 20px rgba(255, 45, 85, 0.3), 0 0 60px rgba(255, 45, 85, 0.1);
    --glow-blue: 0 0 20px rgba(0, 180, 255, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    background-color: var(--color-bg-dark);
    color: var(--color-text-secondary);
    line-height: 1.7;
    direction: ltr;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Ambient background grid pattern - command center feel */
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(0, 255, 157, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(0, 180, 255, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(168, 85, 247, 0.02) 0%, transparent 50%),
        linear-gradient(rgba(255,255,255,0.01) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.01) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 100% 100%, 80px 80px, 80px 80px;
    background-attachment: fixed;
}

/* RTL font override */
body.rtl, body[dir="rtl"], html[dir="rtl"] body {
    font-family: var(--font-rtl);
}

/* RTL helper: toggled by JS via body.rtl class or body[dir="rtl"] attribute */
body.rtl,
body[dir="rtl"] {
    direction: rtl;
}

/* Common reversals for RTL layouts (safe, low-risk rules)
   These help adjust floats and text alignment when switching direction.
*/
body.rtl .float-left { float: right !important; }
body.rtl .float-right { float: left !important; }
body.rtl .text-left { text-align: right !important; }
body.rtl .text-right { text-align: left !important; }
body.rtl .row-reverse-on-rtl { flex-direction: row-reverse !important; }

/* --- 2. Utility Classes --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Remove default list bullets/dots site-wide
   - This prevents browser default markers from appearing across all ul/ol lists.
   - We keep padding/margins reset to avoid unexpected indents.
*/
ul,
ol {
    list-style: none;
    padding-left: 0;
    margin-left: 0;
}

/* Hide marker for browsers that render ::marker (extra safety) */
li::marker {
    color: transparent;
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    border: 1px solid transparent;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(4px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), #00c6ff);
    color: var(--color-bg-dark);
    box-shadow: 0 4px 15px rgba(0, 255, 157, 0.25), inset 0 1px 0 rgba(255,255,255,0.2);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow-primary), 0 8px 25px rgba(0, 255, 157, 0.3);
}

.btn-secondary {
    background: var(--color-bg-glass);
    color: var(--color-text-primary);
    border: 1px solid var(--color-border);
    backdrop-filter: blur(var(--glass-blur));
}

.btn-secondary:hover {
    background: rgba(30, 41, 69, 0.8);
    border-color: var(--color-border-glow);
    box-shadow: 0 0 15px rgba(0, 255, 157, 0.1);
}

.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border: 1px solid rgba(0, 255, 157, 0.4);
    backdrop-filter: blur(4px);
}

/* --- Global mobile / responsive adjustments --- */
@media (max-width: 992px) {
    :root { --header-height: 64px; }
    html { font-size: 15px; }
    .container { padding: 0 1rem; }
    .btn { font-size: 0.95rem; padding: 0.6rem 1rem; }
    h1 { font-size: 2rem; }
    .hero-text h1 { font-size: 2.4rem; }
    .hero-text .subtitle { font-size: 1rem; }
}

/* Large desktop - Ensure all elements are visible */
@media (min-width: 993px) {
    .nav-menu {
        display: flex !important;
    }
    .nav-actions {
        display: flex !important;
    }
    .mobile-toggle {
        display: none !important;
    }
}

@media (max-width: 480px) {
    html { font-size: 14px; }
    .logo { font-size: 1.05rem; }
    .container { padding: 0 0.75rem; }
    .hero-section {
        height: 100vh;
        min-height: auto;
        padding: 0;
    }
    .hero-text h1 { font-size: 1.8rem; }
    .hero-text .subtitle { font-size: 0.9rem; }
    .cta-group { gap: 0.8rem; }
    .pricing-card { padding: 2rem; }
    .stat-value { font-size: 2.2rem; }
}

.btn-outline:hover {
    background-color: rgba(0, 255, 157, 0.1);
    transform: translateY(-3px);
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

.btn i {
    margin-left: 8px;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.8rem;
    font-family: var(--font-display);
    color: var(--color-text-primary);
    margin-bottom: 1rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: linear-gradient(135deg, var(--color-text-primary) 0%, var(--color-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-header p {
    font-size: 1.1rem;
    max-width: 650px;
    margin: 0 auto;
    color: var(--color-text-secondary);
    line-height: 1.8;
}

/* --- 3. Header & Navigation (Glassmorphism Command Bar) --- */
.main-header {
    width: 100%;
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(5, 8, 17, 0.75);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 1px 30px rgba(0, 0, 0, 0.3);
}

.main-header nav.container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    height: 100%;
}

/* Logo: stick to the start */
.main-header nav.container .logo {
    flex: 0 0 auto;
}

/* Nav menu: grow to center */
.main-header nav.container .nav-menu {
    flex: 1;
    display: flex;
    justify-content: center;
}

/* Language selector: no flex growth */
.main-header nav.container .language-selector {
    flex: 0 0 auto;
}

/* Nav actions (buttons): stick to the end */
.main-header nav.container .nav-actions {
    flex: 0 0 auto;
}

/* Mobile toggle: show only on mobile */
.main-header nav.container .mobile-toggle {
    flex: 0 0 auto;
}

/* RTL: flex-direction row-reverse + order still works as expected */
body.rtl .main-header nav.container {
    flex-direction: row-reverse;
}

.logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--color-text-primary);
    text-decoration: none;
    font-family: var(--font-display);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    line-height: 1;
    display: flex;
    align-items: center;
    direction: ltr;
    unicode-bidi: bidi-override;
}

.logo span {
    color: var(--color-primary);
    text-shadow: 0 0 20px rgba(0, 255, 157, 0.5);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-menu li a {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-speed);
    white-space: nowrap;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
}

.nav-menu li a:hover,
.nav-menu li a.active {
    color: var(--color-text-primary);
}

.nav-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--color-text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- 4. Hero Section (Command Center Entry) --- */
.hero-section {
    height: 100vh;
    min-height: 650px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    position: relative;
    overflow: hidden;
    background: #030712;
}

/* Hero background image — ghosted, frosted */
.hero-section::after {
    content: '';
    position: absolute;
    inset: -20px;
    background: url('../images/hero-visual.png') no-repeat center center / cover;
    opacity: 0.18;
    z-index: 0;
    filter: saturate(0.4) brightness(0.55) blur(4px);
    transform: scale(1.05);
}

/* Cinematic multi-layer atmosphere */
.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        /* Top fade — seamless header merge */
        linear-gradient(180deg, rgba(3,7,18,0.98) 0%, rgba(3,7,18,0.4) 12%, transparent 22%),
        /* Bottom fade — seamless section transition */
        linear-gradient(0deg, rgba(3,7,18,1) 0%, rgba(3,7,18,0.7) 6%, transparent 20%),
        /* Cinematic side vignettes */
        linear-gradient(90deg, rgba(3,7,18,0.7) 0%, transparent 25%),
        linear-gradient(270deg, rgba(3,7,18,0.5) 0%, transparent 20%),
        /* Primary neon glow — upper left (hero content side) */
        radial-gradient(ellipse 800px 600px at 20% 35%, rgba(0,255,157,0.06) 0%, transparent 60%),
        /* Secondary blue glow — lower right (widget side) */
        radial-gradient(ellipse 600px 500px at 80% 65%, rgba(0,150,255,0.04) 0%, transparent 60%),
        /* Deep purple core — adds depth */
        radial-gradient(ellipse 500px 500px at 50% 50%, rgba(100,60,200,0.025) 0%, transparent 55%),
        /* Center spotlight — draws eye to content */
        radial-gradient(ellipse 900px 600px at 50% 40%, rgba(15,25,50,0.5) 0%, transparent 65%);
    pointer-events: none;
}

/* Ambient floating orb 1 */
.hero-section .hero-orb-1 {
    position: absolute;
    width: 400px; height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0,255,157,0.07) 0%, transparent 70%);
    top: 10%; left: 5%;
    z-index: 1;
    animation: hero-orb-float 12s ease-in-out infinite;
    filter: blur(60px);
    pointer-events: none;
}
/* Ambient floating orb 2 */
.hero-section .hero-orb-2 {
    position: absolute;
    width: 350px; height: 350px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0,140,255,0.06) 0%, transparent 70%);
    bottom: 15%; right: 8%;
    z-index: 1;
    animation: hero-orb-float 15s ease-in-out infinite reverse;
    filter: blur(50px);
    pointer-events: none;
}
/* Ambient floating orb 3 — subtle purple */
.hero-section .hero-orb-3 {
    position: absolute;
    width: 250px; height: 250px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(168,85,247,0.05) 0%, transparent 70%);
    top: 60%; left: 40%;
    z-index: 1;
    animation: hero-orb-float 18s ease-in-out infinite 3s;
    filter: blur(40px);
    pointer-events: none;
}

@keyframes hero-orb-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -20px) scale(1.05); }
    50% { transform: translate(-15px, 25px) scale(0.95); }
    75% { transform: translate(20px, 10px) scale(1.03); }
}

/* Grid lines overlay — subtle tech feel */
.hero-grid-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(rgba(0,255,157,0.012) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,255,157,0.012) 1px, transparent 1px);
    background-size: 80px 80px;
    pointer-events: none;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, rgba(0,0,0,0.4) 0%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, rgba(0,0,0,0.4) 0%, transparent 70%);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    gap: 2.5rem;
    position: relative;
    z-index: 3;
    text-align: center;
    width: 100%;
    padding: 2rem 0;
}

.hero-text h1 {
    font-size: 3.2rem;
    font-weight: 900;
    font-family: var(--font-display);
    color: var(--color-text-primary);
    line-height: 1.12;
    margin-bottom: 1.4rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-shadow: 0 0 60px rgba(0,255,157,0.08), 0 2px 8px rgba(0,0,0,0.4);
}

.ai-gradient-text {
    background: linear-gradient(135deg, #00ff9d 0%, #00c6ff 35%, #a855f7 65%, #00ff9d 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-flow 6s ease infinite;
    background-size: 300% 300%;
    filter: drop-shadow(0 0 30px rgba(0,255,157,0.35)) drop-shadow(0 0 60px rgba(0,200,255,0.15));
}

@keyframes gradient-flow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-text .subtitle {
    font-size: 1.05rem;
    margin-bottom: 2.2rem;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
    color: rgba(255,255,255,0.5);
    font-weight: 300;
}

.cta-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-visual .hero-image {
    max-width: 100%;
    animation: float-animation 6s ease-in-out infinite;
    /* Subtle neon glow around the hero visual */
    box-shadow: 0 0 40px rgba(0, 255, 157, 0.3), /* Green glow */
                0 0 80px rgba(0, 200, 255, 0.2); /* Blue glow */
    border-radius: var(--border-radius); /* Softens edges */
}

@keyframes float-animation {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

.scroll-down-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--color-primary);
    font-size: 1.5rem;
    animation: bounce 2s infinite;
    opacity: 0.7;
    z-index: 3;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translate(-50%, 0); }
    40% { transform: translate(-50%, -15px); }
    60% { transform: translate(-50%, -5px); }
}

/* === HERO CANVAS (Neural Network Background) === */
.hero-canvas {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 2;
    opacity: 0.25;
}

/* === HERO STATUS BADGE === */
.hero-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 1.2rem;
    background: rgba(0, 255, 157, 0.04);
    border: 1px solid rgba(0, 255, 157, 0.12);
    border-radius: 100px;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--color-primary);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 1.4rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 0 20px rgba(0,255,157,0.04), inset 0 0 20px rgba(0,255,157,0.02);
    animation: badge-glow 4s ease-in-out infinite;
}

@keyframes badge-glow {
    0%, 100% { border-color: rgba(0,255,157,0.12); box-shadow: 0 0 20px rgba(0,255,157,0.04); }
    50% { border-color: rgba(0,255,157,0.25); box-shadow: 0 0 30px rgba(0,255,157,0.08); }
}

.status-dot {
    width: 8px; height: 8px;
    background: var(--color-primary);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--color-primary);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--color-primary); }
    50% { opacity: 0.4; box-shadow: 0 0 20px var(--color-primary); }
}

/* === HERO LIVE WIDGET (Signal Simulator) === */
.hero-live-widget {
    background: rgba(8,14,30,0.6);
    border: 1px solid rgba(0,255,157,0.08);
    border-radius: 16px;
    backdrop-filter: blur(30px) saturate(1.4);
    -webkit-backdrop-filter: blur(30px) saturate(1.4);
    box-shadow:
        0 25px 50px rgba(0,0,0,0.4),
        0 0 0 1px rgba(255,255,255,0.03) inset,
        0 1px 0 rgba(255,255,255,0.05) inset;
    overflow: hidden;
    max-width: 380px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    flex-shrink: 0;
}

.hero-live-widget::before {
    content: '';
    position: absolute;
    top: -1px; left: -1px; right: -1px; bottom: -1px;
    background: linear-gradient(160deg, rgba(0,255,157,0.15), transparent 35%, transparent 65%, rgba(0,150,255,0.1));
    border-radius: inherit;
    z-index: -1;
    animation: widget-border-glow 6s ease-in-out infinite;
}

@keyframes widget-border-glow {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.widget-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(0, 255, 157, 0.05);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-family: var(--font-mono);
    font-size: 0.7rem;
}

.widget-indicator {
    width: 6px; height: 6px;
    background: var(--color-primary);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--color-primary);
    animation: pulse-dot 1.5s ease-in-out infinite;
}

.widget-title {
    color: var(--color-primary);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 600;
    flex: 1;
}

.widget-latency {
    color: var(--color-text-dim);
    font-size: 0.65rem;
}

.widget-body {
    padding: 1rem;
}

.widget-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.widget-row:last-child { border-bottom: none; }

.widget-label {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    font-weight: 500;
    min-width: 80px;
}

.widget-price {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--color-text-primary);
    font-weight: 600;
    flex: 1;
    text-align: right;
    padding: 0 0.5rem;
}

.widget-change {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    min-width: 55px;
    text-align: center;
}

.widget-change.positive {
    color: var(--color-primary);
    background: rgba(0, 255, 157, 0.1);
}

.widget-change.negative {
    color: var(--color-danger);
    background: rgba(255, 45, 85, 0.1);
}

/* Signal processing bar */
.widget-signal-bar {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.signal-processing {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.signal-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--color-text-dim);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    min-width: 90px;
}

.signal-bar-track {
    flex: 1;
    height: 4px;
    background: rgba(255,255,255,0.05);
    border-radius: 2px;
    overflow: hidden;
}

.signal-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent-blue));
    border-radius: 2px;
    transition: width 1s ease;
    box-shadow: 0 0 10px rgba(0, 255, 157, 0.4);
}

.signal-percent {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-primary);
    font-weight: 600;
    min-width: 35px;
    text-align: right;
}

.signal-row {
    padding-top: 0.75rem !important;
}

.signal-badge {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.3rem 0.7rem;
    border-radius: 4px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    animation: signal-pulse 2s ease-in-out infinite;
}

.signal-badge.buy {
    color: #000;
    background: var(--color-primary);
    box-shadow: 0 0 15px rgba(0, 255, 157, 0.4);
}

.signal-badge.sell {
    color: #fff;
    background: var(--color-danger);
    box-shadow: 0 0 15px rgba(255, 45, 85, 0.4);
}

@keyframes signal-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.signal-pair {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--color-text-primary);
    font-weight: 500;
}

.signal-time {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-text-dim);
}

/* Hero content grid for desktop */
@media (min-width: 992px) {
    .hero-content {
        grid-template-columns: 1.2fr 380px;
        text-align: left;
        gap: 3rem;
    }
    .hero-text h1 {
        font-size: 3.4rem;
    }
    .hero-text .subtitle {
        margin-left: 0;
    }
    .cta-group {
        justify-content: flex-start;
    }
    .hero-live-widget {
        margin: 0;
        align-self: center;
    }
}
@media (min-width: 1200px) {
    .hero-content {
        grid-template-columns: 1.3fr 400px;
        gap: 4rem;
    }
    .hero-text h1 {
        font-size: 3.8rem;
    }
    .hero-live-widget {
        max-width: 400px;
    }
}

/* === RTL Hero Layout === */
@media (min-width: 992px) {
    html[dir="rtl"] .hero-content,
    body.rtl .hero-content {
        text-align: right;
    }
    html[dir="rtl"] .cta-group,
    body.rtl .cta-group {
        justify-content: flex-start;
    }
}

/* --- 4. Stats Section (Live Data Tickers) --- */
.stats-section {
    padding: 4rem 0;
    background: linear-gradient(180deg, var(--color-bg-dark) 0%, var(--color-bg-medium) 50%, var(--color-bg-dark) 100%);
    border-top: 1px solid rgba(255,255,255,0.04);
    border-bottom: 1px solid rgba(255,255,255,0.04);
    overflow: hidden;
    position: relative;
}

/* === LIVE METRICS BAR === */
.live-metrics-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding: 1.5rem 2rem;
    background: var(--color-bg-card);
    border: var(--glass-border);
    border-radius: var(--border-radius);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    margin-bottom: 3rem;
    box-shadow: var(--shadow-card);
}

.metric-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.metric-icon {
    color: var(--color-primary);
    font-size: 0.85rem;
    width: 28px; height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 255, 157, 0.1);
    border-radius: 6px;
}

.metric-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--color-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.metric-value {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--color-primary);
    font-weight: 700;
}

.metric-divider {
    width: 1px;
    height: 30px;
    background: rgba(255,255,255,0.06);
}

@media (max-width: 768px) {
    .live-metrics-bar {
        gap: 1rem;
        padding: 1rem;
    }
    .metric-divider { display: none; }
    .metric-item { flex: 1 1 45%; justify-content: center; }
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    max-width: 900px;
    margin: 0 auto;
    margin-bottom: 4rem; /* Space between stats and logo bar */
}

.stat-item {
    position: relative;
    text-align: center;
    padding: 2rem 1.5rem;
    background: var(--color-bg-card);
    border-radius: var(--border-radius);
    border: var(--glass-border);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    transition: all 0.4s ease;
}

.stat-item:hover {
    border-color: rgba(0, 255, 157, 0.2);
    box-shadow: 0 0 30px rgba(0, 255, 157, 0.08);
    transform: translateY(-4px);
}

.stat-decorator {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 4px;
    background-color: var(--color-primary);
    border-radius: 2px;
    box-shadow: 0 0 15px 3px var(--color-primary);
}

.stat-value {
    font-size: 2.8rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--color-primary);
    margin-bottom: 0.5rem;
    text-shadow: 0 0 20px rgba(0, 255, 157, 0.4);
}

.stat-title {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
}

/* --- 5. Logo Ticker (Inside Stats Section) --- */

@keyframes scroll-left {
    0% {
        transform: translateX(0%);
    }
    100% {
        /* Move by 50% of total width (10 logos) */
        transform: translateX(-50%);
    }
}

.ticker-wrapper {
    text-align: center;
    overflow: hidden;
}

.ticker-title {
    color: var(--color-text-secondary);
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 2.5rem;
}

.logo-ticker {
    width: 100%;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 15%, black 85%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0%, black 15%, black 85%, transparent 100%);
}

.logo-set {
    display: flex;
    align-items: center;
}

.logo-track {
    display: flex;
    /* Bar width equals content of 20 logos */
    width: max-content;
    
    /* Fixed animation */
    animation: scroll-left 65s linear infinite;
    align-items: center;
    will-change: transform;
}

.logo-track:hover {
    animation-play-state: paused;
}

.logo-track img {
    /* Size fix: Height increased to 45px */
    height: 45px; 
    width: auto;
    margin: 0 2.5rem; /* symmetric margin so both sets have equal total width */
    flex-shrink: 0;
    
    /* Clarity fix: Filter removed */
    /* filter: grayscale(100%) opacity(0.6) brightness(1.2); */ 
    
    transition: transform 0.3s ease;
    cursor: pointer;
}

.logo-track img:hover {
    transform: scale(1.1);
}

/* Responsiveness for stats section */
@media (max-width: 768px) {
    .stats-container {
        grid-template-columns: 1fr;
        gap: 4rem;
    }
}

/* --- 6. Features Section + Sticky Scroll Storytelling --- */
.features-section {
    padding: 6rem 0;
}

/* === STORY SCROLL CONTAINER === */
.story-scroll-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-bottom: 5rem;
    min-height: 120vh;
    position: relative;
}

.story-sticky-panel {
    position: relative;
    top: 0;
    height: fit-content;
    align-self: start;
    display: flex;
    justify-content: center;
    transform: translateY(0);
    transition: none;
    will-change: transform;
}

.story-visual {
    position: relative;
    width: min(88%, 520px);
    aspect-ratio: 4/3;
    background: var(--color-bg-card);
    border: var(--glass-border);
    border-radius: var(--border-radius);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    box-shadow: var(--shadow-elevated);
    overflow: hidden;
    padding: 0;
}

.story-visual::before {
    content: '';
    position: absolute;
    top: -1px; left: -1px; right: -1px; bottom: -1px;
    background: linear-gradient(135deg, rgba(0,255,157,0.12), transparent 50%, rgba(0,180,255,0.12));
    border-radius: inherit;
    z-index: -1;
    pointer-events: none;
}

.story-layer {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    padding: 0.8rem;
    opacity: 0;
    visibility: hidden;
    z-index: 1;
    pointer-events: none;
    transition: opacity 0.8s ease, visibility 0.8s ease;
    overflow: hidden;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.story-layer.active {
    opacity: 1;
    visibility: visible;
    z-index: 10;
    pointer-events: auto;
}

#story-layer-1:not(.active) {
    opacity: 0;
    visibility: hidden;
    z-index: 1;
}

#story-layer-1.active {
    opacity: 1;
    visibility: visible;
    z-index: 10;
}

.chart-svg {
    width: 100%;
    height: 70%;
    flex-shrink: 0;
}

.story-chart-raw {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.chart-line-raw {
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    animation: draw-line 2.5s ease forwards;
}

.chart-area-raw {
    opacity: 0;
    animation: fade-in-area 1.5s ease forwards 0.5s;
}

@keyframes fade-in-area {
    to { opacity: 1; }
}

.story-layer.active .chart-line-hurst,
.story-layer.active .chart-line-hurst-glow {
    opacity: 1;
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    animation: draw-line 2s ease forwards 0.8s;
}

.story-layer.active .chart-line-hurst {
    stroke-dasharray: 8,4;
}

.story-layer.active .hurst-dot {
    opacity: 1;
    animation: pop-dot 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.story-layer.active .hurst-dot:nth-child(1) { animation-delay: 1.2s; }
.story-layer.active .hurst-dot:nth-child(2) { animation-delay: 1.5s; }
.story-layer.active .hurst-dot:nth-child(3) { animation-delay: 1.8s; }
.story-layer.active .hurst-dot:nth-child(4) { animation-delay: 2.1s; }

@keyframes pop-dot {
    0% { opacity: 0; r: 0; }
    60% { r: 5; }
    100% { opacity: 1; r: 3; }
}

.story-layer.active .fractal-ring {
    opacity: 1;
    animation: ring-pulse 2s ease-in-out infinite;
}

.story-layer.active .fractal-ring:nth-child(1) { animation-delay: 1.5s; }
.story-layer.active .fractal-ring:nth-child(2) { animation-delay: 2s; }

@keyframes ring-pulse {
    0%, 100% { r: 10; opacity: 0.3; }
    50% { r: 14; opacity: 0.6; }
}

.story-layer.active .hurst-label {
    opacity: 1;
    transition: opacity 0.6s ease 2.2s;
}

.raw-bars rect {
    animation: bar-grow 1.5s ease forwards;
    transform-origin: bottom;
}

@keyframes bar-grow {
    0% { opacity: 0; transform: scaleY(0); }
    100% { opacity: 0.3; transform: scaleY(1); }
}

/* Hurst Metrics Row */
.hurst-metrics {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    padding: 0.2rem 0 1.8rem;
}

.hurst-metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    opacity: 0;
    transform: translateY(8px);
    transition: all 0.5s ease;
}

.story-layer.active .hurst-metric {
    opacity: 1;
    transform: translateY(0);
}

.story-layer.active .hurst-metric:nth-child(1) { transition-delay: 1.4s; }
.story-layer.active .hurst-metric:nth-child(2) { transition-delay: 1.7s; }
.story-layer.active .hurst-metric:nth-child(3) { transition-delay: 2s; }

.hm-label {
    font-family: var(--font-mono);
    font-size: 0.55rem;
    color: var(--color-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.hm-value {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
}

.hm-blue { color: #00b4ff; }
.hm-cyan { color: #00ffd5; }
.hm-green { color: var(--color-primary); }

@keyframes draw-line {
    to { stroke-dashoffset: 0; }
}

.story-badge {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.4rem 1rem;
    border-radius: 100px;
    backdrop-filter: blur(10px);
    white-space: nowrap;
    z-index: 5;
}

.math-badge {
    color: var(--color-accent-blue);
    background: rgba(0, 180, 255, 0.1);
    border: 1px solid rgba(0, 180, 255, 0.2);
}

/* ===== Layer 2: Instant Alerts ===== */
.alert-badge {
    color: var(--color-accent-purple);
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.2);
}

.story-alerts-overlay {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.alerts-feed {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 0.5rem;
    flex: 1;
}

.alert-notif {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.7rem;
    background: rgba(255,255,255,0.03);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.06);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.story-layer.active .alert-notif {
    opacity: 1;
    transform: translateY(0);
}

.story-layer.active .alert-notif:nth-child(1) { transition-delay: 0.15s; }
.story-layer.active .alert-notif:nth-child(2) { transition-delay: 0.4s; }
.story-layer.active .alert-notif:nth-child(3) { transition-delay: 0.65s; }

.alert-notif-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.alert-telegram .alert-notif-icon {
    background: rgba(0, 136, 204, 0.15);
    color: #0088cc;
}

.alert-email .alert-notif-icon {
    background: rgba(255, 59, 48, 0.12);
    color: #ff3b30;
}

.alert-app .alert-notif-icon {
    background: rgba(0, 255, 157, 0.12);
    color: var(--color-primary);
}

.alert-notif-body {
    flex: 1;
    min-width: 0;
}

.alert-notif-title {
    font-family: var(--font-display);
    font-size: 0.7rem;
    color: var(--color-text-dim);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 0.15rem;
}

.alert-notif-msg {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--color-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.alert-notif-time {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--color-text-dim);
    flex-shrink: 0;
}

.alert-speed-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--color-primary);
    background: rgba(0, 255, 157, 0.08);
    border: 1px solid rgba(0, 255, 157, 0.2);
    padding: 0.3rem 0.7rem;
    border-radius: 100px;
    opacity: 0;
    animation: none;
}

.story-layer.active .alert-speed-badge {
    opacity: 1;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 5px rgba(0, 255, 157, 0.2); }
    50% { box-shadow: 0 0 15px rgba(0, 255, 157, 0.4); }
}

/* ===== Layer 3: Risk Management ===== */
.risk-badge {
    color: var(--color-warning);
    background: rgba(255, 170, 0, 0.1);
    border: 1px solid rgba(255, 170, 0, 0.2);
}

.story-risk-overlay {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.risk-chart-wrapper {
    flex: 1;
    padding-top: 0.2rem;
}

.risk-chart {
    width: 100%;
    height: 100%;
}

.risk-tp-zone, .risk-sl-zone, .risk-entry-line {
    opacity: 0;
    transition: opacity 0.6s ease;
}

.story-layer.active .risk-tp-zone {
    opacity: 1;
    transition-delay: 0.3s;
}

.story-layer.active .risk-entry-line {
    opacity: 1;
    transition-delay: 0.5s;
}

.story-layer.active .risk-sl-zone {
    opacity: 1;
    transition-delay: 0.7s;
}

.risk-metrics {
    display: flex;
    justify-content: space-around;
    padding: 0.3rem 0 1.8rem;
    gap: 0.4rem;
}

.risk-metric-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.5s ease;
}

.story-layer.active .risk-metric-item {
    opacity: 1;
    transform: translateY(0);
}

.story-layer.active .risk-metric-item:nth-child(1) { transition-delay: 0.4s; }
.story-layer.active .risk-metric-item:nth-child(2) { transition-delay: 0.6s; }
.story-layer.active .risk-metric-item:nth-child(3) { transition-delay: 0.8s; }

.risk-metric-label {
    font-family: var(--font-mono);
    font-size: 0.55rem;
    color: var(--color-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.risk-metric-value {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-text-primary);
}

.rr-value { color: var(--color-primary); }
.dd-value { color: #ff3b30; }

/* ===== Layer 4: Multi-Market ===== */
.multi-badge {
    color: var(--color-accent-blue);
    background: rgba(0, 180, 255, 0.1);
    border: 1px solid rgba(0, 180, 255, 0.2);
}

.story-multimarket-overlay {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    position: relative;
    padding: 0 0 1.5rem;
    overflow: hidden;
}

.mm-header-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
    padding: 0;
}

.mm-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--color-primary);
    box-shadow: 0 0 6px var(--color-primary);
    animation: live-blink 1.5s ease-in-out infinite;
}

@keyframes live-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.mm-live-text {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    color: var(--color-text-dim);
    text-transform: uppercase;
}

.market-cards-grid {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    flex: 1;
    overflow: hidden;
}

.market-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    padding: 0.35rem 0.6rem;
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.market-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    border-radius: 3px 0 0 3px;
}

.market-crypto::before { background: linear-gradient(180deg, #f7931a, rgba(247,147,26,0.2)); }
.market-forex::before { background: linear-gradient(180deg, #00b4ff, rgba(0,180,255,0.2)); }
.market-stocks::before { background: linear-gradient(180deg, #a855f7, rgba(168,85,247,0.2)); }

.story-layer.active .market-card {
    opacity: 1;
    transform: translateY(0);
}

.story-layer.active .market-card:nth-child(1) { transition-delay: 0.15s; }
.story-layer.active .market-card:nth-child(2) { transition-delay: 0.35s; }
.story-layer.active .market-card:nth-child(3) { transition-delay: 0.55s; }

.market-card-top {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.2rem;
}

.market-card-icon {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    flex-shrink: 0;
}

.market-crypto .market-card-icon {
    background: rgba(247, 147, 26, 0.12);
    color: #f7931a;
}

.market-forex .market-card-icon {
    background: rgba(0, 180, 255, 0.12);
    color: #00b4ff;
}

.market-stocks .market-card-icon {
    background: rgba(168, 85, 247, 0.12);
    color: #a855f7;
}

.market-card-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.market-card-name {
    font-family: var(--font-display);
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--color-text-primary);
    letter-spacing: 0.03em;
}

.market-card-count {
    font-family: var(--font-mono);
    font-size: 0.5rem;
    color: var(--color-text-dim);
    letter-spacing: 0.05em;
}

.market-card-sparkline {
    width: 50px;
    height: 16px;
    flex-shrink: 0;
}

.market-card-sparkline svg {
    width: 100%;
    height: 100%;
}

.market-card-pairs {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.market-pair {
    display: flex;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.58rem;
    padding: 0.15rem 0.3rem;
    border-radius: 4px;
    background: rgba(255,255,255,0.015);
    direction: ltr;
}

.pair-name {
    color: var(--color-text-secondary);
    flex: 1;
}

.pair-price {
    color: var(--color-text-dim);
    margin-right: 0.5rem;
    font-size: 0.55rem;
}

.pair-signal {
    font-size: 0.5rem;
    font-weight: 700;
    padding: 0.1rem 0.4rem;
    border-radius: 100px;
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

.pair-signal.buy {
    color: var(--color-primary);
    background: rgba(0, 255, 157, 0.1);
    border: 1px solid rgba(0, 255, 157, 0.15);
}

.pair-signal.sell {
    color: #ff3b30;
    background: rgba(255, 59, 48, 0.1);
    border: 1px solid rgba(255, 59, 48, 0.15);
}

/* Story Steps (Right Side) */
.story-steps {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    padding: 2rem 0;
}

.story-step {
    padding: 2rem;
    border-left: 2px solid rgba(255,255,255,0.05);
    transition: all 0.5s ease;
    position: relative;
}

.story-step::before {
    content: '';
    position: absolute;
    left: -6px; top: 2rem;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--color-text-dim);
    border: 2px solid var(--color-bg-dark);
    transition: all 0.3s ease;
}

.story-step.active {
    border-left-color: var(--color-primary);
}

.story-step.active::before {
    background: var(--color-primary);
    box-shadow: 0 0 10px var(--color-primary);
}

.step-number {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--color-text-dim);
    letter-spacing: 0.15em;
    margin-bottom: 0.5rem;
}

.story-step.active .step-number {
    color: var(--color-primary);
}

.story-step h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--color-text-primary);
    margin-bottom: 0.75rem;
    letter-spacing: 0.03em;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.story-step.active h3 {
    opacity: 1;
}

.story-step p {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.story-step.active p {
    opacity: 1;
}

/* RTL Story */
html[dir="rtl"] .story-step,
body.rtl .story-step {
    border-left: none;
    border-right: 2px solid rgba(255,255,255,0.05);
}

html[dir="rtl"] .story-step::before,
body.rtl .story-step::before {
    left: auto;
    right: -6px;
}

html[dir="rtl"] .story-step.active,
body.rtl .story-step.active {
    border-right-color: var(--color-primary);
}

@media (max-width: 768px) {
    .story-scroll-container {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    .story-sticky-panel {
        position: relative;
        top: 0;
    }
    .story-steps { gap: 2rem; }
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--color-bg-card);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    border: var(--glass-border);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    box-shadow: var(--shadow-card);
}

.feature-card:before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 100px;
    height: 100px;
    background-color: rgba(0, 255, 157, 0.05);
    border-radius: 50%;
    transition: var(--transition-speed);
    opacity: 0;
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: rgba(0, 255, 157, 0.3);
    box-shadow: var(--shadow-elevated), 0 0 30px rgba(0, 255, 157, 0.08);
}

.feature-card:hover:before {
    transform: scale(4);
    opacity: 1;
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: rgba(0, 255, 157, 0.08);
    border: 1px solid rgba(0, 255, 157, 0.15);
    box-shadow: 0 0 20px rgba(0, 255, 157, 0.1);
}

.feature-card h3 {
    font-size: 1.4rem;
    font-family: var(--font-display);
    color: var(--color-text-primary);
    margin-bottom: 1rem;
    letter-spacing: 0.03em;
}

/* --- 7. How It Works Section --- */
.how-it-works-section {
    padding: 6rem 0;
    background: linear-gradient(180deg, var(--color-bg-medium) 0%, var(--color-bg-dark) 100%);
}

.steps-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    position: relative;
}

@media (min-width: 768px) {
    .steps-container {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 3rem;
    }
    
    .step-line {
        position: absolute;
        top: 85px;
        right: 16.66%;
        width: 66.66%;
        display: block;
        height: 2px;
        background: repeating-linear-gradient(
            -55deg,
            var(--color-border) 0 10px,
            transparent 10px 20px
        );
        /* Make the dashed line animate smoothly in a continuous chain */
    /* pattern tile size equals dash (10px) + gap (10px) = 20px so tiles join seamlessly */
    background-size: 20px 2px;
    background-repeat: repeat-x;
    animation: dash-scroll 1.2s linear infinite;
        z-index: 0;
    }

    /* Animate the repeating dashed connector so it scrolls without visible jump */
    @keyframes dash-scroll {
        from { transform: translateX(0); }
        to { transform: translateX(20px); }
    }
}

.step-card {
    background: var(--color-bg-card);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: var(--glass-border);
    text-align: center;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    box-shadow: var(--shadow-card);
    transition: all 0.4s ease;
}

.step-card:hover {
    border-color: rgba(0, 255, 157, 0.2);
    transform: translateY(-6px);
    box-shadow: var(--shadow-elevated), 0 0 25px rgba(0, 255, 157, 0.08);
}

.step-card span {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-primary);
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
}

.step-card i {
    font-size: 3rem;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
    display: block;
}

.step-card h3 {
    font-size: 1.5rem;
    color: var(--color-text-primary);
    margin-bottom: 0.5rem;
}

/* --- 8. Dashboard Simulator Section --- */
.dashboard-preview-section {
    padding: 6rem 0;
    text-align: center;
    background: linear-gradient(180deg, var(--color-bg-dark) 0%, rgba(5,8,17,1) 100%);
}

/* Dashboard Simulator Shell */
.dash-sim {
    background: rgba(8, 12, 28, 0.95);
    border: 1px solid rgba(0,255,157,0.08);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(0,255,157,0.03), 0 12px 40px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.04);
    position: relative;
}

/* Top Status Bar */
.dash-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.55rem 1.2rem;
    background: linear-gradient(180deg, rgba(5,8,17,0.98) 0%, rgba(8,12,28,0.95) 100%);
    border-bottom: 1px solid rgba(0,255,157,0.08);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.dash-topbar-left {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}
.dash-logo-mini {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-text-primary);
    direction: ltr;
    unicode-bidi: bidi-override;
}
.dash-logo-mini .accent { color: var(--color-primary); }
.dash-instrument {
    background: rgba(0,255,157,0.06);
    padding: 0.25rem 0.7rem;
    border-radius: 6px;
    color: var(--color-text-primary);
    font-weight: 600;
    border: 1px solid rgba(0,255,157,0.12);
    font-size: 0.68rem;
}
.dash-instrument i { color: var(--color-warning); margin-right: 0.3rem; }
.dash-version {
    font-size: 0.62rem;
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.dash-topbar-center {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.topbar-kpi {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    transition: background 0.2s;
}
.topbar-kpi:hover { background: rgba(255,255,255,0.03); }
.kpi-label {
    font-size: 0.5rem;
    color: rgba(255,255,255,0.3);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.kpi-value {
    font-weight: 600;
    color: var(--color-text-primary);
    font-size: 0.72rem;
}
.kpi-value.accent { color: var(--color-primary); }
.kpi-bullish { color: var(--color-primary) !important; }
.kpi-bullish i { font-size: 0.55rem; margin-right: 2px; }
.kpi-bearish { color: var(--color-danger) !important; }
.kpi-regime { color: var(--color-accent-purple) !important; font-size: 0.65rem !important; }
.kpi-low { color: var(--color-primary) !important; }
.kpi-low i { font-size: 0.55rem; margin-right: 2px; }
.dot-green {
    display: inline-block;
    width: 6px; height: 6px;
    background: var(--color-primary);
    border-radius: 50%;
    margin-right: 4px;
    box-shadow: 0 0 8px var(--color-primary);
    animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--color-primary); }
    50% { opacity: 0.5; box-shadow: 0 0 4px var(--color-primary); }
}
.dash-topbar-right {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: rgba(255,255,255,0.4);
    font-size: 0.62rem;
}
.dash-topbar-right i { color: rgba(255,255,255,0.25); font-size: 0.55rem; }
.topbar-session strong {
    color: var(--color-text-primary);
    margin-left: 4px;
}
.topbar-live-dot {
    width: 8px; height: 8px;
    background: #ff3b30;
    border-radius: 50%;
    animation: pulse-dot 1.5s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(255,59,48,0.6);
}

/* Dashboard Grid */
.dash-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    background: transparent;
}

/* Panel Base */
.dash-panel {
    background: rgba(10,15,32,0.96);
    border: 1px solid rgba(0,255,157,0.07);
    padding: 1rem;
    min-height: 180px;
    position: relative;
    transition: all 0.3s ease;
    margin: -0.5px; /* collapse double borders */
}
.dash-panel::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(0,255,157,0.02) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}
.dash-panel:hover::before { opacity: 1; }
.panel-header {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    color: rgba(255,255,255,0.45);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.panel-body {
    font-family: var(--font-mono);
    font-size: 0.72rem;
}

/* Panel 1: Decision */
.panel-badge {
    margin-left: auto;
    background: linear-gradient(135deg, rgba(255,215,0,0.15), rgba(255,215,0,0.05));
    border: 1px solid rgba(255,215,0,0.3);
    color: gold;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 0.48rem;
    font-weight: 700;
    letter-spacing: 0.1em;
}
.panel-badge-count {
    margin-left: auto;
    color: var(--color-text-dim);
    font-size: 0.5rem;
}
.decision-card {
    background: rgba(0,255,157,0.03);
    border: 1px solid rgba(0,255,157,0.12);
    border-radius: 8px;
    padding: 0.8rem;
    margin-bottom: 0.8rem;
}
.decision-card.buy-glow {
    box-shadow: 0 0 20px rgba(0,255,157,0.06), inset 0 0 30px rgba(0,255,157,0.02);
}
.decision-signal-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}
.decision-signal-type {
    font-weight: 800;
    font-size: 0.85rem;
    border-radius: 4px;
    padding: 0.15rem 0.5rem;
    font-family: var(--font-mono);
    letter-spacing: 0.06em;
}
.decision-signal-type.buy-type {
    color: var(--color-primary);
    background: rgba(0,255,157,0.08);
    border: 1px solid rgba(0,255,157,0.2);
}
.decision-signal-type.sell-type {
    color: var(--color-danger);
    background: rgba(255,45,85,0.08);
    border: 1px solid rgba(255,45,85,0.2);
}
.decision-signal-type i { font-size: 0.65rem; margin-right: 3px; }
.decision-signal-tag {
    font-size: 0.65rem;
    color: var(--color-text-secondary);
    font-family: var(--font-body);
}
.decision-title {
    font-weight: 600;
    color: var(--color-text-primary);
    font-size: 0.78rem;
    margin-bottom: 0.2rem;
    font-family: var(--font-body);
    line-height: 1.4;
}
.decision-subtitle {
    color: var(--color-text-secondary);
    font-size: 0.68rem;
    margin-bottom: 0.5rem;
}
.decision-meta {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    font-size: 0.58rem;
    color: rgba(255,255,255,0.35);
}
.decision-meta .accent { color: var(--color-primary); }
.meta-veto .accent { font-size: 0.55rem; }
.decision-metrics {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}
.dm-box {
    border: 1px solid rgba(0,255,157,0.15);
    border-radius: 6px;
    padding: 0.4rem 0.7rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    flex: 1;
    background: rgba(0,255,157,0.02);
    transition: all 0.3s ease;
}
.dm-box:hover { border-color: rgba(0,255,157,0.3); background: rgba(0,255,157,0.04); }
.dm-val { font-weight: 700; font-size: 0.85rem; }
.dm-val.accent { color: var(--color-primary); }
.dm-val.danger { color: var(--color-danger); }
.dm-label { font-size: 0.48rem; color: rgba(255,255,255,0.3); letter-spacing: 0.1em; }

/* Panel 2: Timeframes */
.tf-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
}
.tf-cell {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 6px;
    padding: 0.45rem 0.3rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    transition: all 0.3s ease;
    position: relative;
}
.tf-cell:hover { border-color: rgba(0,255,157,0.25); transform: translateY(-1px); }
.tf-cell.tf-active { border-color: rgba(0,255,157,0.2); background: rgba(0,255,157,0.03); }
.tf-cell.tf-danger { border-color: rgba(255,45,85,0.2); background: rgba(255,45,85,0.03); }
.tf-cell.tf-highlight { border-color: rgba(255,255,255,0.1); }
.tf-name { font-size: 0.58rem; color: rgba(255,255,255,0.35); letter-spacing: 0.08em; }
.tf-dir { font-weight: 700; font-size: 0.78rem; }
.tf-dir.buy { color: var(--color-primary); }
.tf-dir.sell { color: var(--color-danger); }
.tf-dir.hold { color: rgba(255,255,255,0.4); }
.tf-score { font-size: 0.55rem; color: rgba(255,255,255,0.25); font-weight: 500; }
.tf-price { font-size: 0.55rem; color: rgba(255,255,255,0.3); }
.tf-conf { font-size: 0.5rem; color: var(--color-primary); font-weight: 600; }

/* Panel 3: Execution */
.exec-badges {
    display: flex;
    gap: 0.35rem;
    margin-bottom: 0.7rem;
    flex-wrap: wrap;
}
.exec-badge {
    padding: 0.2rem 0.55rem;
    border-radius: 20px;
    font-size: 0.58rem;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: all 0.2s;
}
.exec-badge i { font-size: 0.5rem; }
.buy-badge { color: var(--color-primary); border-color: rgba(0,255,157,0.25); background: rgba(0,255,157,0.04); }
.low-badge { color: var(--color-primary); }
.rr-badge { color: var(--color-accent-blue); border-color: rgba(0,198,255,0.2); }
.exec-lot {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    margin-bottom: 0.8rem;
    padding: 0.5rem 0.7rem;
    background: rgba(255,255,255,0.02);
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.04);
}
.lot-label { font-size: 0.55rem; color: rgba(255,255,255,0.35); letter-spacing: 0.06em; }
.lot-value { font-size: 1.7rem; font-weight: 700; color: var(--color-text-primary); line-height: 1; }
.lot-unit { font-size: 0.55rem; color: rgba(255,255,255,0.3); }
.exec-levels { margin-top: 0.3rem; }
.exec-bar {
    display: flex;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.4rem;
    position: relative;
}
.bar-sl { background: linear-gradient(90deg, rgba(255,45,85,0.6), var(--color-danger)); position: relative; }
.bar-entry { background: linear-gradient(90deg, rgba(0,255,157,0.4), var(--color-primary)); position: relative; }
.bar-tp { background: linear-gradient(90deg, rgba(0,198,255,0.4), var(--color-accent-blue)); position: relative; }
.bar-label {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.4rem;
    font-weight: 700;
    color: rgba(0,0,0,0.6);
    letter-spacing: 0.1em;
}
.exec-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.55rem;
}
.exec-labels i { font-size: 0.48rem; margin-right: 2px; }
.sl-label { color: var(--color-danger); }
.entry-label { color: var(--color-primary); }
.tp-label { color: var(--color-accent-blue); }

/* Panel 4: Forecast */
.forecast-tags {
    display: flex;
    gap: 0.35rem;
    margin-bottom: 0.6rem;
}
.f-tag {
    padding: 0.2rem 0.5rem;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    font-size: 0.58rem;
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    gap: 0.2rem;
    transition: all 0.2s;
}
.f-tag i { font-size: 0.48rem; }
.f-tag.active { border-color: var(--color-accent-purple); color: var(--color-accent-purple); background: rgba(99,102,241,0.06); }
.forecast-curve { margin: 0.4rem 0; }
.bell-svg { width: 100%; height: auto; }
.forecast-vals {
    display: flex;
    justify-content: space-between;
    gap: 0.3rem;
}
.fv {
    text-align: center;
    flex: 1;
    padding: 0.3rem;
    border-radius: 6px;
    transition: all 0.2s;
}
.fv:hover { background: rgba(255,255,255,0.02); }
.fv-low { border-left: 2px solid rgba(0,255,157,0.2); }
.fv-mid { border-left: 2px solid var(--color-accent-purple); }
.fv-high { border-left: 2px solid rgba(0,198,255,0.3); }
.fv-label { font-size: 0.45rem; color: rgba(255,255,255,0.3); display: block; letter-spacing: 0.08em; }
.fv-num { font-size: 0.72rem; font-weight: 600; color: var(--color-text-primary); }
.fv-num.accent { color: var(--color-accent-purple); }

/* Panel 5: Depth */
.depth-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.6rem;
}
.depth-spot {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-secondary);
}
.depth-spot .accent { color: var(--color-primary); font-size: 1rem; }
.depth-zone {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.zone-tag {
    background: rgba(0,255,157,0.12);
    color: var(--color-primary);
    padding: 0.12rem 0.35rem;
    border-radius: 4px;
    font-size: 0.55rem;
    font-weight: 700;
}
.zone-label { font-size: 0.62rem; color: var(--color-text-secondary); }
.depth-range {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin: 0.4rem 0;
}
.range-label { font-size: 0.55rem; color: rgba(255,255,255,0.3); }
.range-vals { font-weight: 700; font-size: 0.85rem; }
.range-vals.accent { color: var(--color-primary); }
.depth-visual { margin: 0.5rem 0; }
.depth-bar-track {
    height: 6px;
    background: rgba(255,255,255,0.04);
    border-radius: 3px;
    margin-bottom: 0.3rem;
    overflow: hidden;
    position: relative;
}
.depth-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent-blue));
    border-radius: 3px;
    transition: width 1.5s ease;
    position: relative;
}
.depth-bar-fill::after {
    content: '';
    position: absolute;
    right: 0; top: -2px;
    width: 10px; height: 10px;
    background: var(--color-primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--color-primary);
}
.depth-info {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
}
.depth-pct { font-size: 0.8rem; font-weight: 700; color: var(--color-primary); }
.depth-desc { font-size: 0.55rem; color: rgba(255,255,255,0.3); }
.depth-zones-mini {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.6rem;
    flex-wrap: wrap;
}
.dz-item {
    font-size: 0.55rem;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    gap: 0.2rem;
}
.dz-item i { font-size: 0.45rem; }
.dz-item.support { color: var(--color-primary); border-color: rgba(0,255,157,0.15); }
.dz-item.resistance { color: var(--color-danger); border-color: rgba(255,45,85,0.15); }
.dz-item.liquidity { color: var(--color-accent-blue); border-color: rgba(0,198,255,0.15); }

/* Panel 6: Attribution */
.attr-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.3rem;
    padding: 0.15rem 0;
    transition: all 0.2s;
}
.attr-row:hover { background: rgba(255,255,255,0.02); border-radius: 4px; }
.attr-rank {
    width: 14px; height: 14px;
    background: rgba(255,255,255,0.04);
    border-radius: 50%;
    font-size: 0.45rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.3);
    flex-shrink: 0;
}
.attr-name {
    width: 65px;
    font-size: 0.57rem;
    color: rgba(255,255,255,0.45);
    text-align: right;
    flex-shrink: 0;
}
.attr-bar-wrap {
    flex: 1;
    height: 8px;
    background: rgba(255,255,255,0.03);
    border-radius: 4px;
    overflow: hidden;
}
.attr-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.attr-bar.positive { background: linear-gradient(90deg, rgba(0,255,157,0.2), var(--color-primary)); }
.attr-bar.negative { background: linear-gradient(90deg, rgba(255,45,85,0.2), var(--color-danger)); }
.attr-val {
    width: 38px;
    font-size: 0.62rem;
    font-weight: 600;
    text-align: right;
    flex-shrink: 0;
}
.attr-val.accent { color: var(--color-primary); }
.attr-val.danger { color: var(--color-danger); }

/* Panel 7: Regime */
.regime-header {
    display: flex;
    align-items: baseline;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
}
.regime-num { font-size: 1.5rem; font-weight: 700; line-height: 1; }
.regime-num.accent { color: var(--color-primary); }
.regime-meta {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}
.regime-status {
    font-size: 0.68rem;
    color: var(--color-primary);
    font-weight: 600;
}
.regime-status i { font-size: 0.55rem; margin-right: 2px; }
.regime-type { font-size: 0.55rem; color: rgba(255,255,255,0.35); }
.regime-bar-container { margin-bottom: 0.5rem; }
.regime-track {
    height: 8px;
    background: rgba(255,255,255,0.03);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    margin-bottom: 0.25rem;
}
.regime-fill-neg {
    position: absolute;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--color-danger), rgba(255,45,85,0.15));
    border-radius: 4px 0 0 4px;
}
.regime-fill-pos {
    position: absolute;
    left: 50%;
    height: 100%;
    background: linear-gradient(90deg, rgba(0,255,157,0.15), var(--color-primary));
    border-radius: 0 4px 4px 0;
}
.regime-dot {
    position: absolute;
    top: -3px;
    width: 14px; height: 14px;
    background: var(--color-primary);
    border-radius: 50%;
    border: 2px solid rgba(10,15,32,1);
    transform: translateX(-50%);
    box-shadow: 0 0 12px var(--color-primary);
    z-index: 1;
}
.regime-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.5rem;
    color: rgba(255,255,255,0.25);
}
.regime-l-neg { color: rgba(255,45,85,0.5); }
.regime-l-pos { color: rgba(0,255,157,0.5); }
.regime-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    padding-top: 0.4rem;
    border-top: 1px solid rgba(255,255,255,0.04);
}
.regime-corr {
    font-size: 0.6rem;
    color: rgba(255,255,255,0.35);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.regime-corr i { font-size: 0.5rem; color: rgba(255,255,255,0.2); }
.regime-corr .accent { color: var(--color-primary); font-weight: 700; }
.regime-session { font-size: 0.55rem; color: rgba(255,255,255,0.25); }

/* Panel 8: Macro Feed */
.intel-badge {
    margin-left: auto;
    background: rgba(0,255,157,0.08);
    color: var(--color-primary);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 0.48rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.2rem;
}
.intel-badge i { font-size: 0.42rem; }
.macro-news {
    background: rgba(255,255,255,0.02);
    border-left: 2px solid rgba(0,255,157,0.15);
    padding: 0.5rem 0.6rem;
    margin-bottom: 0.6rem;
    border-radius: 0 6px 6px 0;
}
.macro-source {
    font-size: 0.55rem;
    color: var(--color-primary);
    margin-bottom: 0.3rem;
    font-weight: 600;
}
.macro-source i { font-size: 0.45rem; margin-right: 3px; }
.macro-headline {
    font-size: 0.7rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
    margin-bottom: 0.3rem;
}
.macro-time {
    font-size: 0.52rem;
    color: rgba(255,255,255,0.25);
}
.macro-time i { margin-right: 2px; }
.macro-sentiment {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.sent-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
}
.neutral-dot {
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.3);
}
.sent-label {
    padding: 0.18rem 0.5rem;
    border-radius: 20px;
    font-size: 0.58rem;
    font-weight: 600;
}
.neutral-label { color: rgba(255,255,255,0.4); border: 1px solid rgba(255,255,255,0.08); }
.sent-impact {
    font-size: 0.55rem;
    color: rgba(255,255,255,0.3);
    margin-left: auto;
}
.sent-impact strong { color: var(--color-text-secondary); }
.macro-status {
    font-size: 0.58rem;
    color: var(--color-primary);
    opacity: 0.65;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.macro-status i { font-size: 0.5rem; }

/* Panel 9: Radar */
.radar-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}
.radar-svg { width: 175px; height: 175px; }

/* Dashboard Bottom Overlay */
.dash-sim-overlay {
    background: linear-gradient(0deg, rgba(5,8,17,0.95) 0%, rgba(5,8,17,0.4) 60%, transparent 100%);
    padding: 2.5rem 1rem 1rem;
    text-align: center;
    position: relative;
}
.overlay-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
}
.overlay-dot {
    width: 6px; height: 6px;
    background: var(--color-primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--color-primary);
    animation: pulse-dot 2s ease-in-out infinite;
}
.overlay-text {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--color-primary);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    animation: pulse-text 3s ease-in-out infinite;
}
.overlay-badge {
    font-family: var(--font-mono);
    font-size: 0.55rem;
    color: var(--color-bg-dark);
    background: var(--color-primary);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-weight: 700;
    letter-spacing: 0.08em;
}
.overlay-badge i { font-size: 0.5rem; margin-right: 2px; }
@keyframes pulse-text {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* ===== LIVE DASHBOARD TRANSITIONS ===== */
/* Smooth number & value transitions */
#sim-price, #sim-score, #sim-winrate, #sim-ev, #sim-confidence,
#sim-fc-low, #sim-fc-mid, #sim-fc-high, #sim-depth-pct, #sim-lot,
#sim-regime-num, #sim-regime-corr, #sim-depth-spot {
    transition: color 0.3s ease;
}

/* Regime bar smooth movement */
.regime-fill-pos, .regime-fill-neg {
    transition: width 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.regime-dot {
    transition: left 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Depth bar smooth */
.depth-bar-fill {
    transition: width 0.8s ease;
}

/* SVG radar smooth */
#sim-radar-poly {
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.sim-radar-pt {
    transition: cx 0.8s ease, cy 0.8s ease;
}

/* Macro headline fade */
.macro-headline {
    transition: opacity 0.4s ease;
}

/* KPI value flash on change */
@keyframes kpi-flash {
    0% { text-shadow: 0 0 8px rgba(0,255,157,0.6); }
    100% { text-shadow: none; }
}
.kpi-value {
    transition: all 0.3s ease;
}

/* TF cell smooth class transitions */
.tf-cell {
    transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}
.tf-dir {
    transition: color 0.3s ease;
}
.tf-score {
    transition: color 0.3s ease;
}

/* Attribution bar glow on positive */
.attr-bar.positive {
    box-shadow: 0 0 6px rgba(0,255,157,0.2);
}
.attr-bar.negative {
    box-shadow: 0 0 6px rgba(255,45,85,0.15);
}

/* Live dot pulse for panels */
.dot-green {
    animation: pulse-dot 2s ease-in-out infinite;
}

/* Price chart SVG path smooth */
.price-chart-svg path {
    transition: d 0.6s ease;
}

/* Signal card shimmer on chart update */
@keyframes data-pulse {
    0% { box-shadow: inset 0 0 0 rgba(0,255,157,0); }
    50% { box-shadow: inset 0 0 20px rgba(0,255,157,0.03); }
    100% { box-shadow: inset 0 0 0 rgba(0,255,157,0); }
}
.dash-panel {
    animation: data-pulse 6s ease-in-out infinite;
    animation-delay: calc(var(--panel-idx, 0) * 0.5s);
}
.dash-panel:nth-child(1) { --panel-idx: 0; }
.dash-panel:nth-child(2) { --panel-idx: 1; }
.dash-panel:nth-child(3) { --panel-idx: 2; }
.dash-panel:nth-child(4) { --panel-idx: 3; }
.dash-panel:nth-child(5) { --panel-idx: 4; }
.dash-panel:nth-child(6) { --panel-idx: 5; }
.dash-panel:nth-child(7) { --panel-idx: 6; }
.dash-panel:nth-child(8) { --panel-idx: 7; }
.dash-panel:nth-child(9) { --panel-idx: 8; }

/* Sentiment dot colors */
.bullish-dot { background: var(--color-primary); box-shadow: 0 0 6px var(--color-primary); }
.bearish-dot { background: var(--color-danger); box-shadow: 0 0 6px var(--color-danger); }
.neutral-dot { background: rgba(255,255,255,0.3); }
.bullish-label { color: var(--color-primary); }
.bearish-label { color: var(--color-danger); }
.neutral-label { color: rgba(255,255,255,0.4); }

/* Dashboard Responsive */
@media (max-width: 992px) {
    .dash-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .dash-topbar-center {
        gap: 0.5rem;
    }
    .topbar-kpi { padding: 0.1rem 0.2rem; }
    .kpi-value { font-size: 0.65rem; }
}
@media (max-width: 600px) {
    .dash-grid {
        grid-template-columns: 1fr;
    }
    .dash-topbar {
        flex-direction: column;
        gap: 0.4rem;
        padding: 0.5rem 0.8rem;
    }
    .dash-topbar-left { flex-wrap: wrap; gap: 0.5rem; }
    .dash-topbar-center { justify-content: center; }
    .tf-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .dash-panel { min-height: 150px; }
    .overlay-inner { flex-wrap: wrap; gap: 0.5rem; }
}

/* === EXPLAINABLE AI SECTION === */
.explainable-ai-section {
    padding: 6rem 0;
    background: linear-gradient(180deg, var(--color-bg-medium) 0%, var(--color-bg-dark) 100%);
    position: relative;
    isolation: isolate;
    z-index: 1;
}

.xai-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    overflow: visible;
}

.xai-card {
    background: rgba(12, 18, 36, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    padding: 2rem;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
    overflow: visible;
}

.xai-card:hover {
    border-color: rgba(0, 255, 157, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transform: translateY(-3px) !important;
    z-index: 10;
}

/* XAI Card Top Row */
.xai-card-top {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.xai-rank {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(0,255,157,0.15), rgba(0,198,255,0.1));
    border: 1px solid rgba(0,255,157,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--color-primary);
}

.xai-icon {
    font-size: 1.5rem;
    color: var(--color-primary);
    width: 48px; height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 255, 157, 0.08);
    border-radius: 12px;
    border: 1px solid rgba(0, 255, 157, 0.12);
}

.xai-label {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--color-text-primary);
    font-weight: 600;
    letter-spacing: 0.03em;
    margin-bottom: 0.75rem;
}

.xai-weight {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.xai-bar {
    flex: 1;
    height: 6px;
    background: rgba(255,255,255,0.05);
    border-radius: 3px;
    position: relative;
    overflow: hidden;
}

.xai-bar::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    height: 100%;
    width: var(--weight);
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent-blue));
    border-radius: 3px;
    box-shadow: 0 0 8px rgba(0, 255, 157, 0.4);
    transition: width 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.xai-pct {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--color-primary);
    font-weight: 600;
    min-width: 35px;
    text-align: right;
}

.xai-desc {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--color-text-dim);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 0.6rem;
}

.xai-status {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: rgba(0,255,157,0.5);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.xai-status i { font-size: 0.5rem; color: var(--color-primary); }
.xai-status-partial { color: rgba(255,200,50,0.5); }
.xai-status-partial i { color: rgba(255,200,50,0.7); }

/* XAI Summary Bar */
.xai-summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    background: rgba(10,15,32,0.8);
    border: 1px solid rgba(0,255,157,0.1);
    border-radius: 10px;
    padding: 1rem 2rem;
    margin-bottom: 2rem;
}
.xai-summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}
.xai-summary-label {
    font-family: var(--font-mono);
    font-size: 0.55rem;
    color: rgba(255,255,255,0.3);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.xai-summary-val {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text-primary);
}
.xai-summary-val.accent { color: var(--color-primary); }
.xai-decision-buy {
    color: var(--color-primary) !important;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.xai-summary-divider {
    width: 1px;
    height: 30px;
    background: rgba(255,255,255,0.08);
}

@media (max-width: 600px) {
    .xai-summary { flex-direction: column; gap: 0.8rem; padding: 1rem; }
    .xai-summary-divider { width: 30px; height: 1px; }
}

/* In-card info text — PURE CSS, no JS needed */
.xai-info {
    display: none;
    margin-top: 0.8rem;
    padding: 0.8rem 0 0.2rem 0;
    border-top: 1px solid rgba(0, 255, 157, 0.15);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
    text-align: center;
    position: relative;
    z-index: 2;
}

.xai-card:hover .xai-info {
    display: block;
}

.xai-card.xai-active {
    border-color: rgba(0, 255, 157, 0.3);
    box-shadow: 0 4px 16px rgba(0, 255, 157, 0.12);
    z-index: 10;
}

/* === SYSTEM ARCHITECTURE SECTION === */
.architecture-section {
    padding: 6rem 0;
    background: linear-gradient(180deg, var(--color-bg-dark) 0%, rgba(10,15,35,1) 50%, var(--color-bg-dark) 100%);
}

.arch-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}
.arch-node {
    background: rgba(10,15,32,0.8);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 1.5rem 1.2rem;
    text-align: center;
    min-width: 160px;
    max-width: 200px;
    transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
    position: relative;
}
.arch-node:hover {
    border-color: rgba(0,255,157,0.3);
    box-shadow: 0 0 30px rgba(0,255,157,0.08);
    transform: translateY(-3px);
}
.arch-node-main {
    border-color: rgba(0,255,157,0.2);
    background: rgba(0,255,157,0.03);
    min-width: 200px;
}
.arch-node-badge {
    position: absolute;
    top: -8px;
    right: 12px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 3px;
    padding: 0.1rem 0.4rem;
    font-family: var(--font-mono);
    font-size: 0.45rem;
    letter-spacing: 0.12em;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
}
.arch-node-badge-primary {
    background: rgba(0,255,157,0.1);
    border-color: rgba(0,255,157,0.2);
    color: var(--color-primary);
}
.arch-icon {
    font-size: 1.8rem;
    color: var(--color-primary);
    margin-bottom: 0.6rem;
}
.arch-title {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    color: var(--color-text-primary);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.3rem;
}
.arch-desc {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--color-text-secondary);
}
.arch-sub-items {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-top: 0.5rem;
}
.arch-chip {
    background: rgba(0,255,157,0.08);
    border: 1px solid rgba(0,255,157,0.15);
    border-radius: 6px;
    padding: 0.3rem 0.6rem;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    gap: 0.3rem;
    justify-content: center;
}
.arch-chip i { font-size: 0.55rem; }
.arch-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    padding: 0 0.8rem;
}
.arch-arrow i {
    font-size: 1.5rem;
    color: var(--color-accent-blue);
    opacity: 0.6;
}
.arch-arrow-label {
    font-family: var(--font-mono);
    font-size: 0.45rem;
    color: rgba(255,255,255,0.2);
    letter-spacing: 0.06em;
    white-space: nowrap;
}

/* Architecture Badges */
.arch-badges {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.arch-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    padding: 0.55rem 0.9rem;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--color-text-secondary);
    transition: all 0.3s ease;
}
.arch-badge:hover {
    border-color: rgba(0,255,157,0.2);
    color: var(--color-primary);
    background: rgba(0,255,157,0.03);
}
.arch-badge i {
    color: var(--color-primary);
    font-size: 0.8rem;
}

@media (max-width: 768px) {
    .arch-flow {
        flex-direction: column;
    }
    .arch-arrow {
        transform: rotate(90deg);
        padding: 0.3rem 0;
    }
    .arch-badges {
        flex-direction: column;
        align-items: center;
    }
}

/* === SIGNAL SHOWCASE SECTION === */
.signal-showcase-section {
    padding: 6rem 0;
    background: linear-gradient(180deg, rgba(10,15,35,1) 0%, var(--color-bg-dark) 100%);
}

/* Signal Cards Stack */
.signal-cards-stack {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 3rem;
}
.signal-card-item {
    background: rgba(10,15,32,0.92);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    padding: 1.2rem 1.5rem;
    position: relative;
    transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
    overflow: hidden;
}
.signal-card-item::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.35s ease;
    border-radius: inherit;
    pointer-events: none;
}
.signal-card-item.buy-border::before {
    background: linear-gradient(135deg, rgba(0,255,157,0.04) 0%, transparent 60%);
}
.signal-card-item.sell-border::before {
    background: linear-gradient(135deg, rgba(255,45,85,0.04) 0%, transparent 60%);
}
.signal-card-item.hold-border::before {
    background: linear-gradient(135deg, rgba(255,255,255,0.02) 0%, transparent 60%);
}
.signal-card-item:hover {
    border-color: rgba(0,255,157,0.15);
    box-shadow: 0 0 30px rgba(0,255,157,0.04);
    transform: translateX(3px);
}
.signal-card-item:hover::before { opacity: 1; }
.signal-card-item.buy-border {
    border-left: 3px solid var(--color-primary);
}
.signal-card-item.sell-border {
    border-left: 3px solid var(--color-danger);
}
.signal-card-item.hold-border {
    border-left: 3px solid rgba(255,255,255,0.2);
}

/* Signal Card Top Row */
.sc-top-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
}
.sc-signal-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.65rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
}
.sc-signal-badge.sc-buy {
    background: rgba(0,255,157,0.12);
    color: var(--color-primary);
    border: 1px solid rgba(0,255,157,0.25);
}
.sc-signal-badge.sc-sell {
    background: rgba(255,45,85,0.12);
    color: var(--color-danger);
    border: 1px solid rgba(255,45,85,0.25);
}
.sc-signal-badge.sc-hold {
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.5);
    border: 1px solid rgba(255,255,255,0.12);
}
.sc-signal-badge i { font-size: 0.55rem; }
.sc-timeframe {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 600;
    color: rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.04);
    padding: 0.15rem 0.45rem;
    border-radius: 3px;
    letter-spacing: 0.08em;
}
.sc-price {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 700;
    margin-left: auto;
}
.sc-price.accent { color: var(--color-primary); }

/* Signal Card Content */
.sc-content { margin-bottom: 0.7rem; }
.sc-subtitle {
    color: var(--color-primary);
    font-size: 0.78rem;
    margin-bottom: 0.45rem;
    font-weight: 500;
}
.sc-reason {
    background: rgba(255,255,255,0.025);
    border-left: 2px solid rgba(255,255,255,0.06);
    padding: 0.5rem 0.8rem;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    color: rgba(255,255,255,0.38);
    line-height: 1.65;
    border-radius: 0 4px 4px 0;
}
.sc-reason-title {
    color: rgba(255,255,255,0.55);
    font-weight: 600;
}
.sc-reason-title i {
    color: var(--color-accent-purple);
    margin-right: 0.25rem;
    font-size: 0.55rem;
}

/* Signal Card Metrics */
.sc-metrics {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-start;
}
.sc-m {
    background: rgba(0,255,157,0.03);
    border: 1px solid rgba(0,255,157,0.12);
    border-radius: 6px;
    padding: 0.35rem 0.7rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    flex: 1;
    max-width: 140px;
    transition: border-color 0.3s ease, background 0.3s ease;
}
.sc-m:hover {
    border-color: rgba(0,255,157,0.25);
    background: rgba(0,255,157,0.06);
}
.sc-m-val {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.82rem;
}
.sc-m-val.accent { color: var(--color-primary); }
.sc-m-label {
    font-family: var(--font-mono);
    font-size: 0.46rem;
    color: rgba(255,255,255,0.3);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Chart Preview — Enhanced */
.signal-chart-preview {
    background: rgba(8,12,28,0.92);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 30px rgba(0,0,0,0.3);
}
.chart-header {
    padding: 0.7rem 1.2rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.chart-header .accent { color: var(--color-primary); }
.chart-header-right {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.65rem;
    color: rgba(255,255,255,0.35);
}
.chart-header-right .chart-ohlc {
    display: flex;
    gap: 0.5rem;
}
.chart-header-right .chart-ohlc span {
    font-family: var(--font-mono);
}
.chart-header-right .chart-ohlc .ohlc-label {
    color: rgba(255,255,255,0.25);
    margin-right: 0.15rem;
}
.chart-body {
    padding: 1rem;
    position: relative;
}
.price-chart-svg {
    width: 100%;
    height: 200px;
}
.chart-grid-line {
    stroke: rgba(255,255,255,0.03);
    stroke-dasharray: 4, 6;
}
.chart-price-axis {
    position: absolute;
    right: 0.3rem;
    top: 1rem;
    bottom: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.5rem;
    color: rgba(255,255,255,0.2);
    pointer-events: none;
}
.chart-time-axis {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0 0;
    font-family: var(--font-mono);
    font-size: 0.55rem;
    color: rgba(255,255,255,0.2);
}

/* Signal Filter Bar — Enhanced */
.signal-filter-bar {
    border-top: 1px solid rgba(255,255,255,0.04);
    padding: 0.6rem 1.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    background: rgba(0,0,0,0.15);
}
.filter-buttons {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
}
.tf-btn {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.4);
    padding: 0.25rem 0.55rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    cursor: pointer;
    transition: all 0.25s ease;
}
.tf-btn:hover {
    background: rgba(0,255,157,0.08);
    border-color: rgba(0,255,157,0.2);
    color: rgba(255,255,255,0.7);
}
.tf-btn.active {
    background: rgba(0,255,157,0.12);
    border-color: var(--color-primary);
    color: var(--color-primary);
    font-weight: 700;
    box-shadow: 0 0 12px rgba(0,255,157,0.15);
}
.filter-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: rgba(255,255,255,0.25);
    white-space: nowrap;
}

@media (max-width: 768px) {
    .sc-top-row { flex-wrap: wrap; }
    .sc-price { margin-left: 0; width: 100%; margin-top: 0.3rem; }
}
@media (max-width: 600px) {
    .signal-card-item { padding: 0.9rem; }
    .sc-metrics { flex-wrap: wrap; }
    .sc-m { max-width: none; }
    .chart-time-axis span:nth-child(even) { display: none; }
    .chart-header-right { display: none; }
    .signal-filter-bar { flex-direction: column; align-items: flex-start; }
}

/* --- 9. Pricing Section (Price Anchoring Design) --- */
.pricing-section {
    padding: 6rem 0;
    background: linear-gradient(180deg, var(--color-bg-dark) 0%, var(--color-bg-medium) 50%, var(--color-bg-dark) 100%);
    position: relative;
}

/* Price Anchor Comparison Bar */
.price-anchor-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 2rem 3rem;
    background: var(--color-bg-card);
    border: var(--glass-border);
    border-radius: var(--border-radius);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: var(--shadow-card);
}

.anchor-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    text-align: center;
}

.anchor-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--color-text-dim);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.anchor-price {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 700;
}

.anchor-price.strikethrough {
    color: var(--color-danger);
    text-decoration: line-through;
    opacity: 0.6;
}

.anchor-item.highlight .anchor-price {
    color: var(--color-primary);
    text-shadow: 0 0 15px rgba(0, 255, 157, 0.3);
}

.anchor-speed {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-accent-blue);
}

.anchor-divider {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-text-dim);
    letter-spacing: 0.15em;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 100px;
}

@media (max-width: 640px) {
    .price-anchor-bar {
        flex-direction: column;
        gap: 1.5rem;
        padding: 1.5rem;
    }
}

/* Pricing Card Glow Effect */
.pricing-card-glow {
    position: absolute;
    top: -1px; left: -1px; right: -1px; bottom: -1px;
    background: linear-gradient(135deg, rgba(0,255,157,0.15), transparent 50%, rgba(0,180,255,0.15));
    border-radius: inherit;
    z-index: -1;
    animation: glow-rotate 6s ease-in-out infinite;
}

@keyframes glow-rotate {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.pricing-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 992px) {
    .pricing-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.pricing-card {
    background: var(--color-bg-card);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    border: var(--glass-border);
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    box-shadow: var(--shadow-card);
}

.pricing-card:hover {
    transform: translateY(-8px);
    border-color: rgba(0, 255, 157, 0.15);
    box-shadow: var(--shadow-elevated);
}

.pricing-card.popular {
    border: 1px solid rgba(0, 255, 157, 0.4);
    box-shadow: var(--glow-primary), var(--shadow-elevated);
    transform: translateY(-20px) scale(1.05);
    background: linear-gradient(135deg, rgba(0, 255, 157, 0.05), var(--color-bg-card));
}

.popular-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--color-primary);
    color: var(--color-bg-dark);
    padding: 0.25rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
}

.pricing-card h3 {
    font-size: 1.6rem;
    font-family: var(--font-display);
    color: var(--color-text-primary);
    text-align: center;
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.pricing-card .price {
    font-size: 3rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--color-primary);
    text-align: center;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 20px rgba(0, 255, 157, 0.3);
}

.pricing-card .price span {
    font-size: 1.5rem;
    vertical-align: super;
    margin-left: 0.25rem;
}

.pricing-card .price small {
    font-size: 1rem;
    color: var(--color-text-secondary);
    font-weight: 400;
}

.pricing-card > p {
    text-align: center;
    margin-bottom: 2rem;
    min-height: 40px;
}

.pricing-card ul {
    list-style: none;
    margin-bottom: 2.5rem;
    flex-grow: 1;
}

.pricing-card ul li {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.pricing-card ul li i {
    font-size: 1.2rem;
    margin-left: 10px;
}

.pricing-card ul li .fa-check-circle {
    color: var(--color-primary);
}

.pricing-card ul li .fa-times-circle {
    color: #ff4757;
}

.pricing-card .btn {
    width: 100%;
    text-align: center;
    margin-top: auto;
}

/* --- 10. Final CTA Section (Command Activation) --- */
.final-cta-section {
    padding: 8rem 0;
    text-align: center;
    background:
        radial-gradient(ellipse at 50% 50%, rgba(0, 255, 157, 0.06) 0%, transparent 60%),
        linear-gradient(rgba(5, 8, 17, 0.95), rgba(5, 8, 17, 0.95)),
        url('../images/cta-bg.png') no-repeat center center/cover;
    position: relative;
    overflow: hidden;
}

.final-cta-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0,255,157,0.4), transparent);
}

.final-cta-section::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0,255,157,0.4), transparent);
}

/* Ensure CTA/box elements use the site's primary font to keep typography consistent */
.final-cta-section,
.final-cta-section .cta-content h2,
.final-cta-section .cta-content p,
.cta-group,
.popular-badge,
.pricing-card h3,
.pricing-card .price,
.stat-value,
.form-wrapper .logo,
.form-wrapper h2,
.form-btn,
.btn {
    font-family: var(--font-family);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Tweak weights/sizes for CTA boxes to match site style */
.final-cta-section .cta-content h2,
.pricing-card h3,
.form-wrapper h2 {
    font-weight: 700;
}

.final-cta-section .cta-content p,
.pricing-card .price {
    font-weight: 600;
}

.cta-content h2 {
    font-size: 3rem;
    font-family: var(--font-display);
    color: var(--color-text-primary);
    margin-bottom: 1rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* --- 11. Footer (Data Terminal) --- */
.main-footer {
    padding-top: 5rem;
    background: linear-gradient(180deg, var(--color-bg-dark) 0%, #020408 100%);
    border-top: 1px solid rgba(255,255,255,0.04);
    position: relative;
}

.main-footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0,255,157,0.3), transparent);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col .logo {
    margin-bottom: 1.5rem;
    display: inline-block;
}

.footer-col p {
    max-width: 300px;
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    color: var(--color-text-secondary);
    font-size: 1.5rem;
    transition: var(--transition-speed);
}

.social-links a:hover {
    color: var(--color-primary);
    transform: translateY(-3px);
}

.footer-col h4 {
    font-size: 1.2rem;
    color: var(--color-text-primary);
    margin-bottom: 1.5rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.75rem;
}

.footer-col ul li a {
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: var(--transition-speed);
}

.footer-col ul li a:hover {
    color: var(--color-primary);
    padding-right: 5px;
}

/* Accessibility: Ensure footer contact email has sufficient contrast */
.contact-email a {
    color: #ffffff !important;
    font-weight: 600;
}

.footer-bottom {
    border-top: 1px solid var(--color-border);
    padding: 2rem 0;
    text-align: center;
}

.risk-disclaimer {
    font-size: 0.85rem;
    color: #718096;
    margin-bottom: 1.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.risk-disclaimer strong {
    color: #ffc107;
}

.copyright {
    font-size: 0.9rem;
}

/* --- 12. Animations & Scroll Observer --- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Delay for staggered animations */
.animate-on-scroll:nth-child(1) { transition-delay: 0.1s; }
.animate-on-scroll:nth-child(2) { transition-delay: 0.2s; }
.animate-on-scroll:nth-child(3) { transition-delay: 0.3s; }
.animate-on-scroll:nth-child(4) { transition-delay: 0.4s; }

/* === CUSTOM CURSOR (Neon Aura) === */
.custom-cursor {
    position: fixed;
    width: 40px; height: 40px;
    border: 1px solid rgba(0, 255, 157, 0.3);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, border-color 0.3s, background 0.3s;
    mix-blend-mode: screen;
}

.cursor-dot {
    position: fixed;
    width: 6px; height: 6px;
    background: var(--color-primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10001;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 10px rgba(0, 255, 157, 0.5);
}

.custom-cursor.cursor-hover {
    width: 60px; height: 60px;
    border-color: rgba(0, 255, 157, 0.5);
    background: rgba(0, 255, 157, 0.05);
    box-shadow: 0 0 30px rgba(0, 255, 157, 0.15);
}

.cursor-dot.cursor-hover {
    background: var(--color-primary);
    box-shadow: 0 0 20px rgba(0, 255, 157, 0.8);
    width: 8px; height: 8px;
}

/* Hide default cursor on desktop — moved to comprehensive mobile responsive section */
/* Custom cursor visibility is now controlled by @media (hover: hover) and (pointer: fine) */

/* === GLOW-ON-HOVER (Mouse Position Gradient) === */
.feature-card::after,
.pricing-card::after,
.stat-item::after,
.xai-card::after,
.step-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.4s ease;
    background: radial-gradient(
        300px circle at var(--mouse-x) var(--mouse-y),
        rgba(0, 255, 157, 0.06),
        transparent 60%
    );
    pointer-events: none;
    z-index: 0;
}

.feature-card:hover::after,
.pricing-card:hover::after,
.stat-item:hover::after,
.xai-card:hover::after,
.step-card:hover::after {
    opacity: 1;
}

/* === SELECTION COLOR === */
::selection {
    background: rgba(0, 255, 157, 0.3);
    color: #fff;
}

::-moz-selection {
    background: rgba(0, 255, 157, 0.3);
    color: #fff;
}

/* === SCROLLBAR STYLING === */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-dark);
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 157, 0.2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 157, 0.4);
}

/* --- 14. Utility Additions --- */
.btn-link {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    margin-top: 1.5rem;
    display: inline-block;
    transition: var(--transition-speed);
}
.btn-link i {
    margin-right: 5px;
    transition: transform 0.2s ease-out;
}
.btn-link:hover {
    color: var(--color-primary-dark);
}
.btn-link:hover i {
    transform: translateX(-3px);
}

/* --- Clients Section --- */
.clients-section {
    padding: 4rem 0; /* Slightly less than other sections */
    background-color: var(--color-bg-light); /* Different background color for contrast */
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    text-align: center;
}

.clients-section .section-title {
    margin-bottom: 3rem; /* Extra space before the logo grid */
    font-size: 1.8rem; /* Slightly smaller than primary headings */
    color: var(--color-text-secondary); /* Secondary tone for softer emphasis */
}

.clients-logos {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping on narrow viewports */
    justify-content: center;
    gap: 3rem 4rem; /* Balanced spacing between logos */
    max-width: 1100px;
    margin: 0 auto;
}

.logo-item {
    padding: 1rem;
    position: relative;
    transition: var(--transition-speed);
    cursor: pointer;
}

.logo-item img {
    max-height: 50px; /* Cap logo height for consistency */
    width: auto;
    filter: grayscale(100%) brightness(150%) opacity(0.7); /* Muted appearance until hover */
    transition: filter 0.4s ease-out, transform 0.4s ease-out;
}

.logo-item:hover img {
    filter: grayscale(0%) brightness(100%) opacity(1); /* Reveal color on hover */
    transform: scale(1.05); /* Subtle hover scale */
}

.logo-item::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: var(--border-radius);
    box-shadow: 0 0 0px var(--color-primary-dark); /* Neon glow hidden by default */
    transition: box-shadow 0.4s ease-out;
    pointer-events: none; /* Do not interfere with pointer events */
}

.logo-item:hover::before {
    box-shadow: 0 0 20px var(--color-primary); /* Neon glow when hovered */
}

/* Responsive adjustments for clients section */
@media (max-width: 768px) {
    .clients-logos {
        gap: 2rem 3rem;
    }
    .logo-item img {
        max-height: 40px;
    }
}

@media (max-width: 480px) {
    .clients-logos {
        flex-direction: column; /* Stack logos vertically */
        gap: 1.5rem;
    }
}

/* --- 13. Responsive Design --- */
@media (max-width: 992px) {
    .hero-text h1 {
        font-size: 3rem;
    }
    .cta-group {
        justify-content: center;
    }
    .pricing-card.popular {
        transform: translateY(0) scale(1);
    }

    html {
        font-size: 15px;
    }
    
    .nav-menu {
        display: none !important; /* JS will handle this */
    }

    .nav-actions {
        display: none !important; /* JS will handle this */
    }

    .mobile-toggle {
        display: block !important;
    }

    /* Mobile Menu (JS-toggled) */
    .nav-menu.mobile-active {
        display: flex !important;
        flex-direction: column;
        position: absolute;
        top: var(--header-height);
        right: 0;
        left: 0;
        width: 100%;
        background-color: var(--color-bg-dark);
        padding: 2rem;
        border-bottom: 1px solid var(--color-border);
        box-shadow: 0 10px 20px rgba(0,0,0,0.2);
        z-index: 999;
    }
    
    .nav-menu.mobile-active li {
        width: 100%;
        text-align: center;
        margin-bottom: 0.5rem;
    }
    
    .nav-menu.mobile-active li a {
        padding: 1rem 0;
        display: block;
        width: 100%;
        font-size: 1.1rem;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .btn-large {
        padding: 0.8rem 1.8rem;
        font-size: 1rem;
    }
    
    .cta-group {
        flex-direction: column;
        align-items: center;
    }

    .step-line {
        display: none;
    }
}

/* --- 15. Language Selector --- */
.language-selector {
    position: relative;
    /* Use logical property so spacing follows text direction (LTR/RTL)
       This avoids incorrect left/right offsets when page direction changes. */
    margin-inline-start: 1.5rem; /* distance from adjacent items in the inline flow */
}

.language-selector-button {
    background-color: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-family);
    font-size: 0.9rem;
    transition: var(--transition-speed);
}

.language-selector-button:hover,
.language-selector-button[aria-expanded="true"] {
    background-color: var(--color-bg-light);
    color: var(--color-text-primary);
    border-color: var(--color-primary);
}

.language-selector-button .current-lang {
    font-weight: 600;
}

.language-selector-button .arrow {
    font-size: 0.7rem;
    transition: transform 0.2s ease-out;
}

.language-selector-button[aria-expanded="true"] .arrow {
    transform: rotate(180deg);
}

.language-dropdown {
    position: absolute;
    top: calc(100% + 10px); /* Offset from the trigger button */
    left: 0;
    background-color: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 0.5rem 0;
    list-style: none;
    min-width: 160px; /* Minimum dropdown width */
    z-index: 1100;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);

    /* Opening animation */
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity var(--transition-speed), visibility var(--transition-speed), transform var(--transition-speed);
}

.language-selector.open .language-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-dropdown li {
    margin: 0;
}

.language-dropdown li a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    white-space: nowrap; /* Prevent line breaks */
    transition: background-color 0.2s ease, color 0.2s ease;
}

.language-dropdown li a:hover {
    background-color: var(--color-bg-dark);
    color: var(--color-text-primary);
}

.language-dropdown li a.active {
    color: var(--color-primary);
    font-weight: 600;
    background-color: rgba(0, 255, 157, 0.05); /* Very subtle green highlight */
    cursor: default; /* Current language */
}

/* --- Responsive Adjustments for Language Selector --- */
@media (max-width: 768px) {
    .language-selector {
        margin-left: 0;
        margin-right: 1rem; /* Space from mobile menu button */
    }

    /* On mobile the dropdown is anchored to the right edge to avoid overflow */
    .language-dropdown {
        left: auto; /* Prevent the panel from overflowing the viewport */
        right: 0;
    }
}

/* ==========================================================================
   COMPREHENSIVE MOBILE RESPONSIVE FIX — All Devices
   Covers: 320px–480px (small phones), 481px–767px (large phones/phablets),
           768px–992px (tablets). Fixes overflow, typography, grids, spacing.
   ========================================================================== */

/* --- P0: Prevent horizontal scrollbar on all devices --- */
html, body {
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

/* --- P0: Custom cursor only on devices with fine pointer (desktop) --- */
.custom-cursor,
.cursor-dot {
    display: none;
}
@media (hover: hover) and (pointer: fine) {
    .custom-cursor,
    .cursor-dot {
        display: block;
    }
    body { cursor: none !important; }
    a, button, .feature-card, .pricing-card, .xai-card, .stat-item { cursor: none !important; }
}

/* ==============================
   TABLET BREAKPOINT (max-width: 768px)
   ============================== */
@media (max-width: 768px) {
    /* P0: iOS Safari — disable fixed backgrounds that cause rendering issues */
    body {
        background-attachment: scroll !important;
    }

    /* P0: Section headers — prevent text overflow */
    .section-header h2 {
        font-size: 2rem;
        word-break: break-word;
    }
    .section-header p {
        font-size: 1rem;
        padding: 0 0.5rem;
    }
    .section-header {
        margin-bottom: 2.5rem;
    }

    /* P0: CTA section heading */
    .cta-content h2 {
        font-size: 2rem;
        word-break: break-word;
    }
    .cta-content p {
        font-size: 1rem;
        padding: 0 0.5rem;
    }

    /* P1: Hero section — auto height on tablets */
    .hero-section {
        height: auto;
        min-height: auto;
        padding: 6rem 0 4rem;
    }
    .hero-section::after {
        inset: 0;
    }
    /* Hide floating orbs on tablets/phones — performance + layout */
    .hero-orb-1,
    .hero-orb-2,
    .hero-orb-3 {
        display: none;
    }
    .hero-grid-overlay {
        display: none;
    }
    .hero-content {
        padding: 1rem 0;
    }

    /* P1: Mobile menu scroll safety */
    .nav-menu.mobile-active {
        max-height: calc(100vh - var(--header-height));
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* P1: Stats container — 2 columns on tablets */
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    .stat-value {
        font-size: 2.2rem;
    }

    /* P1: Story scroll — single column */
    .story-scroll-container {
        grid-template-columns: 1fr;
        min-height: auto;
        gap: 2rem;
    }
    .story-sticky-panel {
        position: relative;
        top: 0;
    }
    .story-steps {
        gap: 2rem;
    }
    .story-step {
        padding: 1.5rem;
    }

    /* P1: Features grid */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .feature-card {
        padding: 2rem;
    }

    /* P2: How-it-works steps */
    .steps-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .step-line {
        display: none;
    }

    /* P2: Dashboard grid */
    .dash-grid {
        grid-template-columns: 1fr;
    }
    .dash-topbar {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.5rem 0.8rem;
    }
    .dash-topbar-left { flex-wrap: wrap; gap: 0.5rem; }
    .dash-topbar-center {
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    /* P2: XAI grid */
    .xai-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .xai-summary {
        flex-direction: column;
        gap: 0.8rem;
        padding: 1rem;
    }
    .xai-summary-divider {
        width: 30px;
        height: 1px;
    }
    .xai-info {
        font-size: 0.72rem;
    }

    /* P2: Architecture flow — vertical on mobile */
    .arch-flow {
        flex-direction: column;
    }
    .arch-arrow {
        transform: rotate(90deg);
        padding: 0.3rem 0;
    }
    .arch-badges {
        flex-direction: column;
        align-items: center;
    }

    /* P2: Signal showcase */
    .signal-cards-stack {
        gap: 0.5rem;
    }
    .signal-card-item {
        padding: 1rem;
    }

    /* P2: Pricing cards */
    .pricing-card {
        padding: 2rem 1.5rem;
    }
    .pricing-card .price {
        font-size: 2.5rem;
    }
    .pricing-card .price span {
        font-size: 1.2rem;
    }
    .pricing-card.popular {
        transform: translateY(0) scale(1);
    }

    /* P2: CTA section padding */
    .final-cta-section {
        padding: 5rem 0;
    }

    /* P2: Footer grid */
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    /* P2: Logo ticker */
    .logo-track img {
        height: 35px;
        margin: 0 1.5rem;
    }

    /* P2: Live metrics bar */
    .live-metrics-bar {
        gap: 0.8rem;
        padding: 1rem;
    }
    .metric-divider {
        display: none;
    }
    .metric-item {
        flex: 1 1 45%;
        justify-content: center;
    }

    /* P3: Clients section */
    .clients-logos {
        gap: 2rem 3rem;
    }
    .logo-item img {
        max-height: 40px;
    }

    /* P2: Sections padding reduction */
    .features-section,
    .how-it-works-section,
    .dashboard-preview-section,
    .explainable-ai-section,
    .architecture-section,
    .signal-showcase-section,
    .pricing-section,
    .stats-section {
        padding: 4rem 0;
    }
}

/* ==============================
   LARGE PHONE / PHABLET (481px–767px) — Critical Gap Fill
   ============================== */
@media (max-width: 767px) and (min-width: 481px) {
    .container {
        padding: 0 1rem;
    }

    /* Hero adjustments */
    .hero-text h1 {
        font-size: 2.2rem;
    }
    .hero-text .subtitle {
        font-size: 0.95rem;
    }
    .hero-live-widget {
        max-width: 100%;
    }

    /* Stats — single column */
    .stats-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Dashboard */
    .dash-grid {
        grid-template-columns: 1fr;
    }

    /* Pricing grid */
    .pricing-grid {
        grid-template-columns: 1fr;
    }

    /* Footer — single column */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    .footer-col .logo {
        display: block;
        text-align: center;
    }
    .footer-col p {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
    .social-links {
        justify-content: center;
    }
}

/* ==============================
   SMALL PHONE BREAKPOINT (max-width: 480px)
   ============================== */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    .container {
        padding: 0 0.75rem;
    }

    /* P0: Section headers for small phones */
    .section-header h2 {
        font-size: 1.6rem;
        line-height: 1.2;
    }
    .section-header p {
        font-size: 0.9rem;
    }

    /* P0: CTA heading small phones */
    .cta-content h2 {
        font-size: 1.6rem;
        line-height: 1.2;
    }
    .cta-content p {
        font-size: 0.9rem;
    }

    /* Hero */
    .hero-section {
        height: auto;
        min-height: auto;
        padding: 4rem 0 3rem;
    }
    .hero-text h1 {
        font-size: 1.8rem;
        line-height: 1.15;
    }
    .hero-text .subtitle {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }
    .cta-group {
        flex-direction: column;
        align-items: stretch;
    }
    .cta-group .btn {
        width: 100%;
        text-align: center;
    }
    .btn-large {
        padding: 0.8rem 1.5rem;
        font-size: 0.95rem;
    }

    /* Logo */
    .logo {
        font-size: 1.05rem;
    }

    /* Stats — single column */
    .stats-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-bottom: 2rem;
    }
    .stat-value {
        font-size: 2rem;
    }
    .stat-title {
        font-size: 0.95rem;
    }

    /* Story visual */
    .story-visual {
        aspect-ratio: 3/2;
    }
    .story-step {
        padding: 1rem;
    }
    .story-step h3 {
        font-size: 1.1rem;
    }
    .story-step p {
        font-size: 0.85rem;
    }
    .story-steps {
        gap: 1.5rem;
    }

    /* Features grid — 1 column */
    .features-grid {
        grid-template-columns: 1fr;
    }
    .feature-card {
        padding: 1.5rem;
    }

    /* Steps */
    .step-card {
        padding: 1.5rem;
    }
    .step-card i {
        font-size: 2.5rem;
    }
    .step-card h3 {
        font-size: 1.2rem;
    }

    /* Dashboard */
    .dash-panel {
        min-height: 140px;
        padding: 0.8rem;
    }
    .tf-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .decision-metrics {
        flex-direction: column;
        gap: 0.4rem;
    }
    .dm-box {
        flex: auto;
    }

    /* XAI */
    .xai-card {
        padding: 1.5rem;
    }

    /* Architecture — shrink nodes */
    .arch-node {
        min-width: 140px;
        max-width: 100%;
        padding: 1rem;
    }
    .arch-node-main {
        min-width: 160px;
    }

    /* Signal showcase */
    .signal-card-item {
        padding: 0.9rem;
    }
    .sc-metrics {
        flex-wrap: wrap;
    }
    .sc-m {
        max-width: none;
        flex: 1 1 calc(50% - 0.25rem);
    }
    .chart-header-right {
        display: none;
    }
    .chart-time-axis span:nth-child(even) {
        display: none;
    }
    .signal-filter-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Pricing */
    .pricing-card {
        padding: 1.5rem 1.2rem;
    }
    .pricing-card .price {
        font-size: 2.2rem;
    }
    .pricing-card .price span {
        font-size: 1rem;
    }
    .pricing-card h3 {
        font-size: 1.3rem;
    }
    .popular-badge {
        font-size: 0.8rem;
        padding: 0.2rem 0.8rem;
    }
    .price-anchor-bar {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    /* CTA section */
    .final-cta-section {
        padding: 4rem 0;
    }

    /* Footer — single column */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    .footer-col p {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
    .social-links {
        justify-content: center;
    }
    .main-footer {
        padding-top: 3rem;
    }

    /* Logo ticker */
    .logo-track img {
        height: 30px;
        margin: 0 1rem;
    }

    /* Live metrics */
    .live-metrics-bar {
        flex-direction: column;
        gap: 0.6rem;
        padding: 0.8rem;
    }
    .metric-item {
        flex: 1 1 100%;
    }
    .metric-divider {
        display: none;
    }

    /* Sections padding reduction */
    .features-section,
    .how-it-works-section,
    .dashboard-preview-section,
    .explainable-ai-section,
    .architecture-section,
    .signal-showcase-section,
    .pricing-section,
    .stats-section {
        padding: 3rem 0;
    }

    /* Clients logos stack */
    .clients-logos {
        flex-direction: column;
        gap: 1.5rem;
    }
}

/* ==============================
   EXTRA SMALL PHONE (max-width: 360px)
   ============================== */
@media (max-width: 360px) {
    html {
        font-size: 13px;
    }
    .hero-text h1 {
        font-size: 1.55rem;
    }
    .section-header h2 {
        font-size: 1.4rem;
    }
    .cta-content h2 {
        font-size: 1.4rem;
    }
    .stat-value {
        font-size: 1.8rem;
    }
    .pricing-card .price {
        font-size: 2rem;
    }
    .tf-grid {
        grid-template-columns: 1fr;
    }
    .container {
        padding: 0 0.5rem;
    }
}

/* ==============================
   TOUCH DEVICE OPTIMIZATIONS
   ============================== */
@media (hover: none) and (pointer: coarse) {
    /* Disable hover-dependent transforms on touch */
    .feature-card:hover,
    .step-card:hover,
    .pricing-card:hover,
    .xai-card:hover,
    .stat-item:hover,
    .arch-node:hover {
        transform: none;
    }

    /* Ensure tap targets are at least 44px */
    .nav-menu.mobile-active li a {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Remove hover glow on touch */
    .feature-card::after,
    .pricing-card::after,
    .stat-item::after,
    .xai-card::after,
    .step-card::after {
        display: none;
    }
}

/* ==============================
   LANDSCAPE PHONE OPTIMIZATION
   ============================== */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        height: auto;
        min-height: auto;
        padding: 3rem 0 2rem;
    }
    .hero-text h1 {
        font-size: 1.8rem;
    }
    .nav-menu.mobile-active {
        max-height: 70vh;
        overflow-y: auto;
    }
}

/* ==========================================================================
   RTL (Right-to-Left) Mobile Comprehensive Support
   For Persian (fa), Arabic (ar) and other RTL languages
   ========================================================================== */

/* Base RTL for all screen sizes */
body.rtl, body[dir="rtl"], html[dir="rtl"] body {
    direction: rtl;
    text-align: right;
}

/* RTL icon margins */
body.rtl .btn i,
body[dir="rtl"] .btn i,
html[dir="rtl"] .btn i {
    margin-left: 0;
    margin-right: 8px;
}

body.rtl .btn i.fa-arrow-left,
body[dir="rtl"] .btn i.fa-arrow-left,
html[dir="rtl"] .btn i.fa-arrow-left {
    transform: scaleX(-1);
}

body.rtl .btn i.fa-arrow-right,
body[dir="rtl"] .btn i.fa-arrow-right,
html[dir="rtl"] .btn i.fa-arrow-right {
    transform: scaleX(-1);
}

/* RTL Footer */
body.rtl .footer-col,
body[dir="rtl"] .footer-col,
html[dir="rtl"] .footer-col {
    text-align: right;
}

body.rtl .social-links,
body[dir="rtl"] .social-links,
html[dir="rtl"] .social-links {
    justify-content: flex-start;
    flex-direction: row-reverse;
}

body.rtl .footer-col ul li a:hover,
body[dir="rtl"] .footer-col ul li a:hover,
html[dir="rtl"] .footer-col ul li a:hover {
    padding-right: 0;
    padding-left: 5px;
}

/* RTL Feature Cards & Lists */
body.rtl .feature-card,
body[dir="rtl"] .feature-card,
html[dir="rtl"] .feature-card {
    text-align: right;
}

body.rtl .feature-list li,
body[dir="rtl"] .feature-list li,
html[dir="rtl"] .feature-list li {
    text-align: right;
    flex-direction: row-reverse;
}

body.rtl .feature-list li i,
body[dir="rtl"] .feature-list li i,
html[dir="rtl"] .feature-list li i {
    margin-right: 0;
    margin-left: 0.75rem;
}

/* RTL Pricing Cards */
body.rtl .pricing-card,
body[dir="rtl"] .pricing-card,
html[dir="rtl"] .pricing-card {
    text-align: right;
}

body.rtl .price-features li,
body[dir="rtl"] .price-features li,
html[dir="rtl"] .price-features li {
    text-align: right;
}

body.rtl .price-features li i,
body[dir="rtl"] .price-features li i,
html[dir="rtl"] .price-features li i {
    margin-right: 0;
    margin-left: 10px;
}

/* RTL Testimonial Cards */
body.rtl .testimonial-card,
body[dir="rtl"] .testimonial-card,
html[dir="rtl"] .testimonial-card {
    text-align: right;
}

body.rtl .author-info,
body[dir="rtl"] .author-info,
html[dir="rtl"] .author-info {
    flex-direction: row-reverse;
}

body.rtl .author-info img,
body[dir="rtl"] .author-info img,
html[dir="rtl"] .author-info img {
    margin-right: 0;
    margin-left: 1rem;
}

/* RTL FAQ Accordion */
body.rtl .faq-item,
body[dir="rtl"] .faq-item,
html[dir="rtl"] .faq-item {
    text-align: right;
}

body.rtl .faq-question,
body[dir="rtl"] .faq-question,
html[dir="rtl"] .faq-question {
    flex-direction: row-reverse;
}

body.rtl .faq-question i,
body[dir="rtl"] .faq-question i,
html[dir="rtl"] .faq-question i {
    margin-left: 0;
    margin-right: auto;
}

/* RTL Mobile Specific (Tablet) */
@media (max-width: 992px) {
    body.rtl .main-header nav.container,
    body[dir="rtl"] .main-header nav.container,
    html[dir="rtl"] .main-header nav.container {
        flex-direction: row-reverse;
    }
    
    body.rtl .mobile-toggle,
    body[dir="rtl"] .mobile-toggle,
    html[dir="rtl"] .mobile-toggle {
        order: -1;
        margin-left: 0;
        margin-right: auto;
    }
    
    body.rtl .logo,
    body[dir="rtl"] .logo,
    html[dir="rtl"] .logo {
        order: 1;
    }
    
    body.rtl .language-selector,
    body[dir="rtl"] .language-selector,
    html[dir="rtl"] .language-selector {
        order: 0;
        margin-right: 0;
        margin-left: 1rem;
    }
    
    body.rtl .nav-menu.mobile-active,
    body[dir="rtl"] .nav-menu.mobile-active,
    html[dir="rtl"] .nav-menu.mobile-active {
        text-align: center;
        right: 0;
        left: 0;
    }
    
    body.rtl .nav-menu.mobile-active li,
    body[dir="rtl"] .nav-menu.mobile-active li,
    html[dir="rtl"] .nav-menu.mobile-active li {
        text-align: center;
    }
    
    body.rtl .nav-menu.mobile-active li a,
    body[dir="rtl"] .nav-menu.mobile-active li a,
    html[dir="rtl"] .nav-menu.mobile-active li a {
        text-align: center;
        display: block;
        padding: 1rem 0;
    }
    
    body.rtl .hero-text,
    body[dir="rtl"] .hero-text,
    html[dir="rtl"] .hero-text {
        text-align: right;
    }
    
    body.rtl .cta-group,
    body[dir="rtl"] .cta-group,
    html[dir="rtl"] .cta-group {
        justify-content: flex-start;
        flex-direction: row-reverse;
    }
    
    body.rtl .language-dropdown,
    body[dir="rtl"] .language-dropdown,
    html[dir="rtl"] .language-dropdown {
        left: 0;
        right: auto;
    }
}

/* RTL Mobile Specific (Small phones) */
@media (max-width: 480px) {
    body.rtl .footer-grid,
    body[dir="rtl"] .footer-grid,
    html[dir="rtl"] .footer-grid {
        text-align: right;
    }
    
    body.rtl .footer-col p,
    body[dir="rtl"] .footer-col p,
    html[dir="rtl"] .footer-col p {
        margin-right: 0;
        margin-left: auto;
    }
    
    body.rtl .stat-card,
    body[dir="rtl"] .stat-card,
    html[dir="rtl"] .stat-card {
        text-align: right;
    }
    
    body.rtl .step-content,
    body[dir="rtl"] .step-content,
    html[dir="rtl"] .step-content {
        text-align: right;
    }
}

/* Anchor dropdown to the inline end in RTL so it doesn't overflow off-screen */
body.rtl .language-dropdown,
body[dir="rtl"] .language-dropdown,
html[dir="rtl"] .language-dropdown {
    left: auto;
    right: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   NEW IN v2 — Institutional Protection Layer (landing section)
   ═══════════════════════════════════════════════════════════════════════════ */
.features-v2-section {
    position: relative;
    padding: clamp(60px, 10vw, 110px) 0;
    background:
        radial-gradient(ellipse at 30% 0%, rgba(56,189,248,0.08), transparent 60%),
        radial-gradient(ellipse at 70% 100%, rgba(168,85,247,0.06), transparent 60%),
        linear-gradient(180deg, rgba(8,12,24,0.0) 0%, rgba(8,12,24,0.4) 100%);
    overflow: hidden;
}
.features-v2-section .section-eyebrow {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #38bdf8;
    background: linear-gradient(135deg, rgba(56,189,248,0.12), rgba(168,85,247,0.10));
    border: 1px solid rgba(56,189,248,0.4);
    margin-bottom: 12px;
    box-shadow: 0 0 18px rgba(56,189,248,0.15);
}
.features-v2-section .section-subtitle {
    max-width: 680px;
    margin: 12px auto 0;
    color: var(--color-text-secondary, rgba(230,237,243,0.72));
    font-size: 1.02rem;
    line-height: 1.55;
}
.features-grid--v2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: clamp(16px, 2.4vw, 28px);
    margin-top: clamp(28px, 5vw, 56px);
}
.feature-card--v2 {
    position: relative;
    padding: 26px 24px;
    border-radius: 18px;
    background: linear-gradient(160deg, rgba(15,23,42,0.85), rgba(8,12,24,0.7));
    border: 1px solid rgba(56,189,248,0.18);
    transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
    overflow: hidden;
}
.feature-card--v2::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(56,189,248,0.0), rgba(168,85,247,0.0));
    transition: background 0.4s ease;
    pointer-events: none;
}
.feature-card--v2:hover {
    transform: translateY(-4px);
    border-color: rgba(56,189,248,0.45);
    box-shadow: 0 18px 40px rgba(0,0,0,0.45), 0 0 28px rgba(56,189,248,0.15);
}
.feature-card--v2:hover::before {
    background: linear-gradient(135deg, rgba(56,189,248,0.06), rgba(168,85,247,0.06));
}
.feature-card--v2 .feature-icon {
    width: 52px; height: 52px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(56,189,248,0.18), rgba(168,85,247,0.14));
    border: 1px solid rgba(56,189,248,0.35);
    color: #7dd3fc;
    font-size: 1.4rem;
    margin-bottom: 16px;
    box-shadow: inset 0 0 12px rgba(56,189,248,0.18);
}
.feature-card--v2 h3 {
    font-size: 1.12rem;
    font-weight: 700;
    margin: 0 0 10px;
    color: #f1f5f9;
}
.feature-card--v2 p {
    color: rgba(226,232,240,0.78);
    font-size: 0.94rem;
    line-height: 1.55;
    margin: 0 0 16px;
}
.feature-card--v2 .btn-link {
    color: #7dd3fc;
    font-weight: 600;
    font-size: 0.88rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.25s ease, color 0.25s ease;
}
.feature-card--v2 .btn-link:hover {
    color: #bae6fd;
    gap: 10px;
}
@media (prefers-reduced-motion: reduce) {
    .feature-card--v2, .feature-card--v2:hover { transition: none; transform: none; }
}
