/* ==========================================================================
   FOREX MASTERY DESIGN SYSTEM - DMTRADE
   Tailored Financial Trading Palette: Emerald Green (Bull), Crimson (Bear),
   Wall Street Deep Navy, Luxury Gold / Amber & TradingView Chart Gradients.
   ========================================================================== */

:root {
    --forex-emerald: #10b981;
    --forex-bull-green: #059669;
    --forex-neon-mint: #34d399;
    --forex-light-green: #d1fae5;
    
    --forex-crimson: #ef4444;
    --forex-bear-red: #dc2626;
    
    --forex-gold: #f59e0b;
    --forex-amber: #d97706;
    --forex-yellow-glow: #fbbf24;
    
    --forex-cyan: #06b6d4;
    --forex-electric-sky: #38bdf8;
    --forex-sapphire: #2563eb;
    
    --forex-navy: #030712;
    --forex-terminal-blue: #081a36;
    --forex-terminal-green: #05261d;
    --forex-ink: #0f172a;
    --mission-sticky-top: 62px;
    --mission-scroll-offset: 195px;
}

.KantumruyPro { font-family: "Kantumruy Pro", sans-serif; }

body,
body * { font-family: "Kantumruy Pro", sans-serif !important; }

/* Financial Market Canvas */
html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    box-sizing: border-box;
}

#appCapsule {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    box-sizing: border-box;
}

body.bg-white {
    background:
        radial-gradient(circle at top right, rgba(16, 185, 129, .14), transparent 32%),
        radial-gradient(circle at 0 16%, rgba(245, 158, 11, .12), transparent 28%),
        radial-gradient(circle at 85% 72%, rgba(6, 182, 212, .10), transparent 30%),
        linear-gradient(180deg, #f0fdf4 0%, #ffffff 36%, #f8fafc 100%);
}

/* ==========================================================================
   Hero Section - Forex Trading Floor (Terminal Navy + Bull Emerald + Gold)
   ========================================================================== */
.ai-hero,
.forex-hero {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(16, 185, 129, .45);
    border-radius: 25px;
    padding: 22px 19px 20px;
    margin-top: 6px;
    color: #ffffff;
    background:
        radial-gradient(circle at 90% 12%, rgba(16, 185, 129, .42), transparent 38%),
        radial-gradient(circle at 10% 90%, rgba(245, 158, 11, .32), transparent 36%),
        radial-gradient(circle at 50% 50%, rgba(6, 182, 212, .15), transparent 60%),
        linear-gradient(135deg, #030712 0%, #071933 50%, #062b20 100%);
    box-shadow: 0 20px 48px rgba(3, 7, 18, .45), 0 0 25px rgba(16, 185, 129, .18), inset 0 1px 0 rgba(255, 255, 255, .20);
}

.ai-hero::before,
.ai-hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.ai-hero::before { 
    top: -68px; 
    right: 42px; 
    width: 150px; 
    height: 150px; 
    border: 1px solid rgba(16, 185, 129, .30);
    background: radial-gradient(circle, rgba(16, 185, 129, .20), transparent 70%);
}

.ai-hero::after { 
    bottom: -86px; 
    left: 24px; 
    width: 210px; 
    height: 210px; 
    border: 1px solid rgba(245, 158, 11, .28);
    background: radial-gradient(circle, rgba(245, 158, 11, .16), transparent 70%);
}

.ai-hero > * { position: relative; z-index: 1; }

.ai-pill,
.forex-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 15px;
    margin-bottom: 13px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
    color: #a7f3d0;
    background: rgba(6, 78, 59, .55);
    border: 1px solid rgba(52, 211, 153, .55);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 0 18px rgba(16, 185, 129, .30);
    backdrop-filter: blur(14px);
}

.duration-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 13px;
    padding: 7px 13px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    color: #fef08a;
    background: rgba(120, 53, 15, .50);
    border: 1px solid rgba(251, 191, 36, .40);
    box-shadow: 0 0 12px rgba(245, 158, 11, .20);
}

.ai-hero-title {
    margin: 0 0 10px;
    color: #ffffff;
    font-size: clamp(27px, 8vw, 36px);
    font-weight: 800;
    line-height: 1.35;
    text-shadow: 0 4px 20px rgba(0, 0, 0, .85);
}

.ai-author-row { color: rgba(209, 250, 229, .90) !important; }
.ai-author-row a { color: #34d399 !important; font-weight: 700; }
.ai-hero .lead { color: rgba(240, 253, 244, .95); font-size: 17px; line-height: 1.9; }

/* Mission Row inside Hero */
.hero-mission-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    padding-top: 15px;
    border-top: 1px solid rgba(16, 185, 129, .28);
}

.hero-mission-info { display: flex; align-items: center; gap: 10px; min-width: 0; }
.hero-mission-info > ion-icon { 
    flex: 0 0 auto; 
    color: #10b981; 
    font-size: 26px; 
    filter: drop-shadow(0 0 12px rgba(16, 185, 129, .9)); 
}
.hero-mission-copy { display: grid; gap: 1px; }
.hero-mission-copy b { color: #ffffff; font-size: 13px; line-height: 1.3; }
.hero-mission-copy span { color: rgba(209, 250, 229, .85); font-size: 11px; line-height: 1.35; }
.hero-xp {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 2px;
    color: #fbbf24;
    font-size: 11px;
    font-weight: 800;
}

.mission-start {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 38px;
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 12px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    background: linear-gradient(135deg, #059669, #10b981 50%, #0284c7);
    box-shadow: 0 8px 24px rgba(16, 185, 129, .40);
    transition: transform .18s ease, box-shadow .18s ease;
}

.mission-start:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(16, 185, 129, .55);
    color: #fff;
}

.mission-start ion-icon { font-size: 17px; }
.mission-start:focus-visible { outline: 3px solid #34d399; outline-offset: 3px; }

/* ==========================================================================
   Mission Console Shell & Sticky Navigation Bar (Trading Terminal Matrix)
   ========================================================================== */
.mission-console-shell { 
    margin: 12px 16px 17px; 
    position: relative;
    max-width: calc(100vw - 32px);
    box-sizing: border-box;
}

.mission-console {
    position: relative;
    z-index: 12;
    overflow: hidden;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 13px 15px;
    border: 1px solid rgba(16, 185, 129, .40);
    border-radius: 20px;
    color: #f0fdf4;
    background:
        radial-gradient(circle at 92% 10%, rgba(16, 185, 129, .35), transparent 38%),
        radial-gradient(circle at 8% 90%, rgba(245, 158, 11, .25), transparent 35%),
        linear-gradient(135deg, rgba(3, 7, 18, .94), rgba(7, 25, 51, .92) 55%, rgba(6, 43, 33, .94));
    box-shadow: 0 18px 40px rgba(3, 7, 18, .45), inset 0 1px rgba(255, 255, 255, .20);
    backdrop-filter: blur(24px) saturate(170%);
    -webkit-backdrop-filter: blur(24px) saturate(170%);
}

.mission-console.is-pinned {
    position: fixed !important;
    top: var(--mission-sticky-top, 60px) !important;
    left: var(--mission-fixed-left, 16px) !important;
    width: var(--mission-fixed-width, calc(100vw - 32px)) !important;
    max-width: calc(100vw - 32px) !important;
    right: auto !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    z-index: 999 !important;
    box-shadow: 0 20px 48px rgba(0, 0, 0, .60), 0 0 20px rgba(16, 185, 129, .25), inset 0 1px rgba(255, 255, 255, .28) !important;
}

.mission-console::after {
    content: "";
    position: absolute;
    top: -70px;
    right: -45px;
    width: 168px;
    height: 168px;
    border: 1px solid rgba(16, 185, 129, .25);
    border-radius: 50%;
    pointer-events: none;
}

.mission-console > * { position: relative; z-index: 1; }
[data-mission-checkpoint],
.ai-section-card,
.forex-section-card,
section.section,
.ai-section-card h2,
.forex-section-card h2 { 
    scroll-margin-top: var(--mission-scroll-offset, 195px) !important; 
}

.mission-console-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.mission-label { display: flex; align-items: center; gap: 7px; color: #a7f3d0; font-size: 12px; font-weight: 800; letter-spacing: .06em; }
.mission-label ion-icon { color: #10b981; font-size: 18px; filter: drop-shadow(0 0 8px rgba(16, 185, 129, .8)); }
.mission-status { color: rgba(209, 250, 229, .85); font-size: 11px; font-weight: 700; text-align: right; }
.mission-status b { color: #34d399; }

.mission-progress-track { 
    width: 100%; 
    height: 7px; 
    margin: 10px 0 11px; 
    overflow: hidden; 
    border-radius: 999px; 
    background: rgba(255, 255, 255, .14); 
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, .4); 
}
.mission-progress-fill { 
    display: block; 
    width: 0; 
    height: 100%; 
    border-radius: inherit; 
    background: linear-gradient(90deg, #f59e0b, #10b981 40%, #06b6d4 75%, #3b82f6); 
    box-shadow: 0 0 16px rgba(16, 185, 129, .85); 
    transition: width .48s cubic-bezier(.2, .9, .2, 1); 
}

.mission-stages { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.mission-stages::-webkit-scrollbar { display: none; }

.mission-stage {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    padding: 6px 10px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 999px;
    color: rgba(209, 250, 229, .88);
    font-family: "Kantumruy Pro", sans-serif;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    background: rgba(255, 255, 255, .06);
    cursor: pointer;
    transition: border-color .22s ease, color .22s ease, background .22s ease, transform .22s ease;
}

.mission-stage:hover { transform: translateY(-1px); border-color: rgba(52, 211, 153, .7); color: #fff; }
.mission-stage:focus-visible { outline: 3px solid #34d399; outline-offset: 2px; }
.mission-stage .stage-number { 
    display: grid; 
    place-items: center; 
    width: 18px; 
    height: 18px; 
    border-radius: 50%; 
    color: #a7f3d0; 
    font-size: 9.5px; 
    font-weight: 800; 
    background: rgba(6, 78, 59, .65); 
    transition: background .2s ease, color .2s ease; 
}

.mission-stage.is-visited,
.mission-stage.is-completed { 
    border-color: rgba(52, 211, 153, .45); 
    color: #fff; 
    background: rgba(6, 78, 59, .35); 
}
.mission-stage.is-visited .stage-number,
.mission-stage.is-completed .stage-number { color: #fff; background: #059669; }

.mission-stage.is-active,
.mission-stage.active {
    border-color: #34d399 !important;
    color: #fff !important;
    background: linear-gradient(135deg, rgba(5, 150, 105, .75), rgba(6, 182, 212, .65)) !important;
    box-shadow: 0 0 18px rgba(16, 185, 129, .65), inset 0 0 10px rgba(255, 255, 255, .25) !important;
    transform: translateY(-2px);
}

.mission-stage.is-active .stage-number,
.mission-stage.active .stage-number {
    color: #fff !important;
    background: linear-gradient(135deg, #059669, #34d399) !important;
    box-shadow: 0 0 8px rgba(52, 211, 153, .95) !important;
}

/* ==========================================================================
   Section Cards & Financial Highlights
   ========================================================================== */
.ai-section-card,
.forex-section-card,
figure,
.blog-card {
    border: 1px solid rgba(16, 185, 129, .22);
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 14px 34px rgba(3, 7, 18, .06);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.ai-section-card,
.forex-section-card {
    border-radius: 22px;
    padding: 20px 18px;
    margin-top: 15px;
}

.lesson-highlight {
    position: relative;
    overflow: hidden;
    margin: 14px 0;
    padding: 17px 18px;
    border-left: 4px solid #10b981;
    border-top: 1px solid rgba(16, 185, 129, .25);
    border-right: 1px solid rgba(16, 185, 129, .25);
    border-bottom: 1px solid rgba(16, 185, 129, .25);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(240, 253, 244, .98), rgba(248, 250, 252, .96));
    box-shadow: 0 8px 24px rgba(16, 185, 129, .08);
}

.lesson-highlight::after {
    content: "";
    position: absolute;
    top: -62px;
    right: -40px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(16, 185, 129, .18), transparent 66%);
    pointer-events: none;
}

.lesson-highlight > * { position: relative; z-index: 1; }

.objective-card {
    position: relative;
    border-radius: 18px;
    padding: 16px 18px;
    border-left: 4px solid #f59e0b;
    border-top: 1px solid rgba(245, 158, 11, .25);
    border-right: 1px solid rgba(245, 158, 11, .25);
    border-bottom: 1px solid rgba(245, 158, 11, .25);
    background: linear-gradient(135deg, rgba(254, 252, 232, .98), rgba(255, 251, 235, .96));
    box-shadow: 0 8px 22px rgba(245, 158, 11, .07);
}

.objective-card h4 {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #d97706;
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 8px;
}

.lesson-note {
    position: relative;
    border-radius: 18px;
    padding: 16px 18px;
    margin: 16px 0;
    border: 1px solid rgba(245, 158, 11, .35);
    background: linear-gradient(135deg, rgba(255, 251, 235, .98), rgba(254, 243, 199, .92));
    box-shadow: 0 10px 25px rgba(245, 158, 11, .09);
}

.lesson-note::before {
    content: "⚠️ ចំណាំសំខាន់សម្រាប់ការត្រេត ";
    display: block;
    margin-bottom: 7px;
    color: #d97706;
    font-size: 12px;
    font-weight: 800;
}

.pro-tip {
    border-left: 4px solid #10b981;
    background: linear-gradient(135deg, rgba(240, 253, 244, .98), rgba(248, 250, 252, .96));
    border-radius: 16px;
    padding: 15px 17px;
    margin: 15px 0;
    border-top: 1px solid rgba(16, 185, 129, .22);
    border-right: 1px solid rgba(16, 185, 129, .22);
    border-bottom: 1px solid rgba(16, 185, 129, .22);
}
.pro-tip strong { color: #059669; }

.warning-box {
    border-left: 4px solid #ef4444;
    background: linear-gradient(135deg, rgba(254, 242, 242, .98), rgba(255, 241, 242, .96));
    border-radius: 16px;
    padding: 15px 17px;
    margin: 15px 0;
    border-top: 1px solid rgba(239, 68, 68, .22);
    border-right: 1px solid rgba(239, 68, 68, .22);
    border-bottom: 1px solid rgba(239, 68, 68, .22);
}
.warning-box strong { color: #dc2626; }

.formula-box {
    position: relative;
    padding: 16px 18px;
    margin: 15px 0;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(240, 253, 244, .98), rgba(236, 253, 245, .95));
    border: 1px solid rgba(16, 185, 129, .32);
    box-shadow: 0 8px 22px rgba(16, 185, 129, .08);
}
.formula-box::before {
    content: "📐 រូបមន្តគណនា Forex គន្លឹះ ";
    display: block;
    margin-bottom: 7px;
    color: #059669;
    font-size: 12px;
    font-weight: 800;
}

#appCapsule p { font-size: 17px; line-height: 1.9; }
#appCapsule li { font-size: 17px; line-height: 1.84; margin-bottom: 6px; }
#appCapsule h2 { font-size: 23px; font-weight: 800; }

#appCapsule h3 {
    position: relative;
    margin-top: 23px;
    margin-bottom: 10px;
    padding-left: 14px;
    color: var(--forex-ink);
    font-size: 20px;
    font-weight: 800;
    line-height: 1.55;
}

#appCapsule h3::before {
    content: "";
    position: absolute;
    top: .47em;
    left: 0;
    width: 6px;
    height: 24px;
    border-radius: 99px;
    background: linear-gradient(180deg, #10b981, #f59e0b);
}

#appCapsule h3:nth-of-type(4n+2)::before { background: linear-gradient(180deg, #059669, #06b6d4); }
#appCapsule h3:nth-of-type(4n+3)::before { background: linear-gradient(180deg, #f59e0b, #d97706); }
#appCapsule h3:nth-of-type(4n)::before { background: linear-gradient(180deg, #10b981, #34d399); }

figure { margin: 18px 0; padding: 12px; border-radius: 22px; }

.lesson-media {
    padding: 8px;
    overflow: hidden;
}

.lesson-media img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 10px 26px rgba(3, 7, 18, .16);
}

/* ==========================================================================
   Grids & Cards (Definitions, Abilities, Comparisons)
   ========================================================================== */
.definition-grid,
.ability-grid,
.comparison-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 15px 0 6px;
}

.definition-card,
.ability-card,
.comparison-card {
    padding: 15px;
    border: 1px solid rgba(16, 185, 129, .22);
    border-radius: 16px;
    background: linear-gradient(145deg, #ffffff, #f0fdf4);
    box-shadow: 0 6px 18px rgba(3, 7, 18, .04);
}

.definition-card ion-icon,
.ability-card ion-icon,
.comparison-card ion-icon {
    display: block;
    margin-bottom: 8px;
    font-size: 28px;
}

.definition-card strong,
.ability-card strong,
.comparison-card strong { display: block; margin-bottom: 4px; color: var(--forex-ink); font-size: 15px; }
.definition-card span,
.ability-card span,
.comparison-card span { display: block; color: #475569; font-size: 13px; line-height: 1.65; }

.definition-card:nth-child(1) ion-icon { color: var(--forex-emerald); }
.definition-card:nth-child(2) ion-icon { color: var(--forex-gold); }
.definition-card:nth-child(3) ion-icon { color: var(--forex-cyan); }
.definition-card:nth-child(4) ion-icon { color: var(--forex-sapphire); }

/* ==========================================================================
   Master Strategy / Action Prompt Box (Golden Protocol Style)
   ========================================================================== */
.prompt-box,
.strategy-box {
    position: relative;
    overflow: hidden;
    margin-top: 14px;
    padding: 19px 17px;
    border: 1px solid rgba(245, 158, 11, .45);
    border-radius: 20px;
    color: #fef08a;
    background:
        radial-gradient(circle at 92% 10%, rgba(245, 158, 11, .25), transparent 40%),
        radial-gradient(circle at 10% 90%, rgba(16, 185, 129, .20), transparent 40%),
        linear-gradient(135deg, #030712 0%, #151004 55%, #05241b 100%);
    box-shadow: 0 14px 32px rgba(3, 7, 18, .40), 0 0 20px rgba(245, 158, 11, .15);
}

.prompt-box::after,
.strategy-box::after { 
    content: ""; 
    position: absolute; 
    top: -65px; 
    right: -45px; 
    width: 160px; 
    height: 160px; 
    border-radius: 50%; 
    background: rgba(245, 158, 11, .15); 
}
.prompt-box > *,
.strategy-box > * { position: relative; z-index: 1; }
.prompt-label { display: flex; align-items: center; gap: 7px; color: #fbbf24; font-size: 12px; font-weight: 800; }
.prompt-text { margin: 9px 0 14px; color: #f8fafc; font-size: 15px; line-height: 1.85; }

.copy-btn,
.reveal-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 8px 15px;
    border: 0;
    border-radius: 11px;
    color: #030712;
    font-family: "Kantumruy Pro", sans-serif;
    font-size: 13px;
    font-weight: 800;
    background: linear-gradient(135deg, #f59e0b, #fbbf24 50%, #34d399);
    box-shadow: 0 4px 16px rgba(245, 158, 11, .35);
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease;
}

.copy-btn:hover,
.reveal-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, .50);
}

.copy-btn:focus-visible,
.reveal-btn:focus-visible { outline: 3px solid #fbbf24; outline-offset: 2px; }
.copy-feedback { display: inline-block; margin-left: 8px; color: #34d399; font-size: 12px; font-weight: 700; }

/* ==========================================================================
   Interactive Live Forex Lab - Trading Simulator Terminal
   ========================================================================== */
.ai-lab,
.forex-lab {
    position: relative;
    overflow: hidden;
    margin-top: 15px;
    padding: 20px 18px;
    border: 1px solid rgba(16, 185, 129, .42);
    border-radius: 22px;
    color: #ffffff;
    background:
        radial-gradient(circle at 94% 8%, rgba(16, 185, 129, .38), transparent 35%),
        radial-gradient(circle at 8% 95%, rgba(6, 182, 212, .30), transparent 35%),
        linear-gradient(135deg, #030712 0%, #06192e 50%, #05261d 100%);
    box-shadow: 0 18px 44px rgba(3, 7, 18, .45), 0 0 25px rgba(16, 185, 129, .15), inset 0 1px 0 rgba(255, 255, 255, .15);
}

.ai-lab::before {
    content: "";
    position: absolute;
    top: -82px;
    left: -55px;
    width: 190px;
    height: 190px;
    border: 1px solid rgba(16, 185, 129, .22);
    border-radius: 50%;
    pointer-events: none;
}

.ai-lab > * { position: relative; z-index: 1; }
.lab-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.lab-kicker { display: flex; align-items: center; gap: 6px; color: #34d399; font-size: 11px; font-weight: 800; letter-spacing: .10em; }
.lab-kicker ion-icon { font-size: 16px; }
.lab-title { margin: 5px 0 0; color: #fff; font-size: 21px; font-weight: 800; line-height: 1.45; }
.lab-status { 
    display: inline-flex; 
    align-items: center; 
    gap: 5px; 
    flex: 0 0 auto; 
    margin-top: 2px; 
    padding: 6px 11px; 
    border: 1px solid rgba(52, 211, 153, .45); 
    border-radius: 999px; 
    color: #a7f3d0; 
    font-size: 10px; 
    font-weight: 800; 
    background: rgba(6, 78, 59, .55); 
}
.lab-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #34d399; box-shadow: 0 0 10px #34d399; }
.lab-description { margin: 10px 0 14px; color: rgba(209, 250, 229, .90); font-size: 14px !important; line-height: 1.7 !important; }
.lab-inputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }

.lab-input {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-height: 61px;
    padding: 9px 11px;
    border: 1px solid rgba(16, 185, 129, .25);
    border-radius: 14px;
    color: #f0fdf4;
    font-family: "Kantumruy Pro", sans-serif;
    text-align: left;
    background: rgba(255, 255, 255, .06);
    cursor: pointer;
    transition: transform .22s ease, border-color .22s ease, background .22s ease, box-shadow .22s ease;
}

.lab-input:hover,
.lab-input.is-selected { 
    transform: translateY(-2px); 
    border-color: #34d399; 
    background: linear-gradient(135deg, rgba(5, 150, 105, .45), rgba(6, 182, 212, .30)); 
    box-shadow: 0 10px 24px rgba(16, 185, 129, .30); 
}

.lab-input:focus-visible { outline: 3px solid #34d399; outline-offset: 2px; }
.lab-input ion-icon { color: #34d399; font-size: 23px; }
.lab-input strong { display: block; font-size: 13px; line-height: 1.3; }
.lab-input small { display: block; margin-top: 1px; color: rgba(209, 250, 229, .75); font-size: 10px; line-height: 1.35; }

.lab-flow { display: grid; grid-template-columns: minmax(0, 1fr) 17px minmax(0, 1fr) 17px minmax(0, 1fr); align-items: stretch; gap: 4px; margin-top: 15px; }
.lab-node,
.lab-core { 
    display: grid; 
    place-items: center; 
    align-content: center; 
    min-height: 116px; 
    padding: 10px 6px; 
    border: 1px solid rgba(16, 185, 129, .28); 
    border-radius: 15px; 
    text-align: center; 
    background: rgba(255, 255, 255, .07); 
}
.lab-node ion-icon { margin-bottom: 6px; color: #34d399; font-size: 25px; }
.lab-node strong,
.lab-core strong { display: block; color: #fff; font-size: 12px; line-height: 1.4; }
.lab-node small,
.lab-core small { display: block; margin-top: 3px; color: rgba(209, 250, 229, .75); font-size: 9px; line-height: 1.35; }

.lab-core { 
    position: relative; 
    overflow: hidden; 
    border-color: rgba(52, 211, 153, .55); 
    background: radial-gradient(circle at 50% 20%, rgba(16, 185, 129, .45), rgba(6, 182, 212, .25) 45%, rgba(255, 255, 255, .06) 72%); 
}

.lab-core ion-icon { margin-bottom: 6px; color: #fef08a; font-size: 32px; filter: drop-shadow(0 0 12px rgba(245, 158, 11, .9)); transition: transform .3s ease; }
.lab-core::after { content: ""; position: absolute; width: 74px; height: 74px; border: 1px solid rgba(52, 211, 153, .45); border-radius: 50%; pointer-events: none; }
.lab-arrow { display: grid; place-items: center; color: #34d399; font-size: 20px; text-shadow: 0 0 12px rgba(52, 211, 153, .85); }
.lab-result { 
    margin-top: 12px; 
    padding: 12px 14px; 
    border: 1px solid rgba(16, 185, 129, .40); 
    border-radius: 14px; 
    color: #d1fae5; 
    font-size: 13px; 
    line-height: 1.65; 
    background: rgba(6, 78, 59, .45); 
    box-shadow: 0 6px 18px rgba(3, 7, 18, .20);
    transition: all .3s ease; 
}
.lab-result b { color: #6ee7b7; }

.lab-status.is-busy {
    background: rgba(16, 185, 129, .45) !important;
    color: #a7f3d0 !important;
    box-shadow: 0 0 16px rgba(16, 185, 129, .8) !important;
    animation: labStatusPulse 0.6s ease-in-out infinite;
}

@keyframes labStatusPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.75; transform: scale(0.96); }
}
@keyframes labCoreRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@keyframes labPulse { 
    0% { transform: scale(1); filter: drop-shadow(0 0 9px rgba(16, 185, 129, .6)); }
    50% { transform: scale(1.18); filter: brightness(1.35) drop-shadow(0 0 25px rgba(16, 185, 129, 1)); } 
    100% { transform: scale(1); filter: drop-shadow(0 0 9px rgba(16, 185, 129, .6)); }
}
@keyframes labFlow { 
    0% { opacity: .3; transform: translateX(-5px); }
    50% { opacity: 1; transform: translateX(7px); color: #34d399; text-shadow: 0 0 18px rgba(52, 211, 153, 1); }
    100% { opacity: .3; transform: translateX(-5px); }
}
@keyframes labResultPop {
    0% { opacity: 0; transform: translateY(8px) scale(0.97); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.ai-lab.is-processing {
    border-color: rgba(52, 211, 153, .75) !important;
    box-shadow: 0 20px 48px rgba(16, 185, 129, .35), inset 0 1px rgba(255, 255, 255, .30) !important;
}
.ai-lab.is-processing .lab-core ion-icon { animation: labPulse .6s ease-in-out infinite; }
.ai-lab.is-processing .lab-core::after {
    border-style: dashed;
    border-color: rgba(52, 211, 153, .85);
    animation: labCoreRotate 2s linear infinite;
}
.ai-lab.is-processing .lab-arrow { animation: labFlow .5s ease-in-out infinite; }
.lab-result.is-animating { animation: labResultPop .45s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

/* ==========================================================================
   Knowledge Check Quiz Section (High-Winrate Feedback)
   ========================================================================== */
.check-card { 
    margin-top: 15px; 
    padding: 18px; 
    border: 1px solid rgba(16, 185, 129, .32); 
    border-radius: 18px; 
    background: linear-gradient(135deg, #f0fdf4, #ecfdf5); 
    box-shadow: 0 10px 26px rgba(16, 185, 129, .08); 
}

.check-kicker { display: flex; align-items: center; gap: 7px; color: #059669; font-size: 12px; font-weight: 800; letter-spacing: .05em; }
.check-question { margin: 8px 0 12px; color: var(--forex-ink); font-size: 16px; font-weight: 800; line-height: 1.7; }
.answer-options { display: grid; gap: 8px; margin-bottom: 13px; }

.answer-option { 
    width: 100%; 
    font-family: "Kantumruy Pro", sans-serif; 
    text-align: left; 
    cursor: pointer; 
    padding: 12px 14px; 
    border: 1px solid rgba(16, 185, 129, .25); 
    border-radius: 12px; 
    color: #1e293b; 
    background: rgba(255, 255, 255, .94); 
    font-size: 14px; 
    line-height: 1.6; 
    transition: transform .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease; 
}

.answer-option:hover { 
    transform: translateX(2px); 
    border-color: #10b981; 
    box-shadow: 0 6px 15px rgba(16, 185, 129, .14); 
}

.answer-option:focus-visible { outline: 3px solid #10b981; outline-offset: 2px; }
.answer-option.is-correct { color: #065f46 !important; border-color: rgba(5, 150, 105, .65) !important; background: #d1fae5 !important; font-weight: 700; }
.answer-option.is-incorrect { color: #991b1b !important; border-color: rgba(239, 68, 68, .55) !important; background: #fee2e2 !important; }

.check-answer { display: none; margin-top: 11px; padding: 12px 14px; border-radius: 12px; color: #065f46; background: #d1fae5; border: 1px solid rgba(5, 150, 105, .35); font-size: 14px; line-height: 1.7; }
.check-answer.is-visible { display: block; }
.check-answer.is-incorrect { color: #991b1b; border-color: rgba(239, 68, 68, .35); background: #fee2e2; }

/* ==========================================================================
   Summary Card & Mission Completion
   ========================================================================== */
.summary-card {
    position: relative;
    padding: 18px 20px;
    border-left: 4px solid #10b981;
    border-top: 1px solid rgba(16, 185, 129, .25);
    border-right: 1px solid rgba(16, 185, 129, .25);
    border-bottom: 1px solid rgba(16, 185, 129, .25);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(240, 253, 244, .98), rgba(248, 250, 252, .96));
    box-shadow: 0 10px 28px rgba(16, 185, 129, .08);
}

.summary-card h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #059669;
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 10px;
}

.summary-list {
    margin: 0;
    padding-left: 18px;
}

.mission-complete {
    margin-top: 16px;
    padding: 20px 18px;
    border-radius: 22px;
    border: 1px solid rgba(245, 158, 11, .45);
    background:
        radial-gradient(circle at 92% 10%, rgba(245, 158, 11, .30), transparent 38%),
        radial-gradient(circle at 8% 90%, rgba(16, 185, 129, .25), transparent 38%),
        linear-gradient(135deg, #030712 0%, #151105 52%, #05261d 100%);
    color: #ffffff;
    box-shadow: 0 18px 42px rgba(3, 7, 18, .40), 0 0 25px rgba(245, 158, 11, .15);
}

.completion-top {
    display: flex;
    align-items: center;
    gap: 14px;
}

.completion-orbit {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    color: #ffffff;
    font-size: 26px;
    background: linear-gradient(135deg, #f59e0b, #10b981);
    box-shadow: 0 0 18px rgba(245, 158, 11, .65);
}

.completion-kicker {
    font-size: 11px;
    font-weight: 800;
    color: #fbbf24;
    letter-spacing: .08em;
}

.completion-top h2 {
    margin: 2px 0 0;
    font-size: 17px;
    font-weight: 800;
    color: #ffffff;
}

.mission-complete p {
    margin: 10px 0 14px;
    font-size: 14px;
    color: rgba(209, 250, 229, .90);
    line-height: 1.7;
}

.completion-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.completion-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    color: #fef08a;
    background: rgba(120, 53, 15, .50);
    border: 1px solid rgba(251, 191, 36, .45);
}

.completion-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 800;
    color: #030712;
    background: linear-gradient(135deg, #f59e0b, #34d399);
    box-shadow: 0 6px 18px rgba(245, 158, 11, .35);
    text-decoration: none;
    transition: transform .18s ease;
}

.completion-cta:hover {
    transform: translateY(-1px);
    color: #000;
}

/* Lesson Navigation */
.lesson-navigation .next-card-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 800;
    color: #059669;
    letter-spacing: .05em;
    margin-bottom: 4px;
}


/* ==========================================================================
   FOREX MASTERY DARK MODE SYSTEM - DMTRADE
   Seamless, High-Contrast Dark Theme for Financial & Forex Trading
   ========================================================================== */

body.dark-mode.bg-white,
body.dark-mode {
    background:
        radial-gradient(circle at 95% 4%, rgba(16, 185, 129, .22), transparent 32%),
        radial-gradient(circle at 0 25%, rgba(245, 158, 11, .16), transparent 30%),
        radial-gradient(circle at 80% 80%, rgba(6, 182, 212, .14), transparent 32%),
        linear-gradient(180deg, #030712 0%, #061229 45%, #04171e 100%) !important;
    color: #f1f5f9 !important;
}

body.dark-mode .appHeader {
    background: rgba(3, 7, 18, .88) !important;
    border-bottom: 1px solid rgba(16, 185, 129, .22) !important;
    backdrop-filter: blur(16px) !important;
}

body.dark-mode .pageTitle a {
    color: #f8fafc !important;
}

body.dark-mode .headerButton {
    color: #a7f3d0 !important;
}

body.dark-mode .mission-console {
    border-color: rgba(52, 211, 153, .45) !important;
    background:
        radial-gradient(circle at 92% 10%, rgba(16, 185, 129, .38), transparent 38%),
        radial-gradient(circle at 8% 90%, rgba(245, 158, 11, .28), transparent 35%),
        linear-gradient(135deg, rgba(3, 7, 18, .96), rgba(7, 25, 51, .94) 55%, rgba(6, 43, 33, .96)) !important;
    box-shadow: 0 20px 45px rgba(0, 0, 0, .55), inset 0 1px rgba(255, 255, 255, .15) !important;
}

body.dark-mode .ai-section-card,
body.dark-mode .forex-section-card,
body.dark-mode figure,
body.dark-mode .blog-card {
    background: linear-gradient(145deg, rgba(8, 20, 42, .96), rgba(5, 28, 32, .94)) !important;
    border-color: rgba(16, 185, 129, .28) !important;
    box-shadow: inset 0 1px rgba(255, 255, 255, .06), 0 16px 36px rgba(0, 0, 0, .45) !important;
}

body.dark-mode .lesson-media {
    background: linear-gradient(145deg, #030712, #071526) !important;
}

body.dark-mode .lesson-media img {
    box-shadow: 0 14px 32px rgba(0, 0, 0, .60) !important;
}

body.dark-mode #appCapsule p,
body.dark-mode #appCapsule li,
body.dark-mode .definition-card span,
body.dark-mode .ability-card span,
body.dark-mode .comparison-card span,
body.dark-mode .example-item span {
    color: #cbd5e1 !important;
}

body.dark-mode #appCapsule h2,
body.dark-mode #appCapsule h3,
body.dark-mode .definition-card strong,
body.dark-mode .ability-card strong,
body.dark-mode .comparison-card strong,
body.dark-mode .example-item strong,
body.dark-mode .blog-card .title,
body.dark-mode .check-question {
    color: #f8fafc !important;
}

body.dark-mode .lesson-highlight {
    background: linear-gradient(135deg, rgba(6, 38, 32, .94), rgba(8, 26, 54, .92)) !important;
    border-color: rgba(16, 185, 129, .35) !important;
    border-left: 4px solid #10b981 !important;
    color: #e2e8f0 !important;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .30) !important;
}

body.dark-mode .objective-card {
    background: linear-gradient(135deg, rgba(48, 28, 5, .88), rgba(28, 20, 3, .85)) !important;
    border-color: rgba(245, 158, 11, .35) !important;
    border-left: 4px solid #f59e0b !important;
    color: #fef08a !important;
}

body.dark-mode .objective-card h4 {
    color: #fbbf24 !important;
}

body.dark-mode .lesson-note {
    background: linear-gradient(135deg, rgba(58, 33, 4, .88), rgba(45, 20, 2, .85)) !important;
    border-color: rgba(245, 158, 11, .35) !important;
    color: #fef08a !important;
}

body.dark-mode .pro-tip {
    background: linear-gradient(135deg, rgba(4, 44, 34, .88), rgba(3, 30, 24, .85)) !important;
    border-color: rgba(16, 185, 129, .35) !important;
    border-left: 4px solid #10b981 !important;
    color: #d1fae5 !important;
}

body.dark-mode .warning-box {
    background: linear-gradient(135deg, rgba(69, 10, 10, .88), rgba(45, 6, 6, .85)) !important;
    border-color: rgba(239, 68, 68, .35) !important;
    border-left: 4px solid #ef4444 !important;
    color: #fecdd3 !important;
}

body.dark-mode .formula-box {
    background: linear-gradient(135deg, rgba(6, 44, 38, .92), rgba(5, 28, 48, .88)) !important;
    border-color: rgba(16, 185, 129, .40) !important;
    color: #a7f3d0 !important;
}

body.dark-mode .definition-card,
body.dark-mode .comparison-card,
body.dark-mode .example-item {
    background: linear-gradient(145deg, rgba(11, 24, 48, .92), rgba(6, 32, 28, .90)) !important;
    border-color: rgba(16, 185, 129, .25) !important;
}

body.dark-mode .check-card {
    background: linear-gradient(135deg, rgba(6, 35, 30, .94), rgba(8, 24, 52, .92)) !important;
    border-color: rgba(16, 185, 129, .38) !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .35) !important;
}

body.dark-mode .check-kicker {
    color: #34d399 !important;
}

body.dark-mode .answer-option {
    background: rgba(15, 23, 42, .85) !important;
    border-color: rgba(16, 185, 129, .25) !important;
    color: #e2e8f0 !important;
}

body.dark-mode .answer-option:hover {
    border-color: #34d399 !important;
    background: rgba(16, 185, 129, .15) !important;
}

body.dark-mode .answer-option.is-correct {
    color: #a7f3d0 !important;
    background: rgba(6, 78, 59, .85) !important;
    border-color: rgba(52, 211, 153, .65) !important;
}

body.dark-mode .answer-option.is-incorrect {
    color: #fecdd3 !important;
    background: rgba(127, 29, 29, .85) !important;
    border-color: rgba(239, 68, 68, .60) !important;
}

body.dark-mode .check-answer {
    color: #d1fae5 !important;
    background: rgba(6, 78, 59, .88) !important;
    border-color: rgba(52, 211, 153, .45) !important;
}

body.dark-mode .summary-card {
    background: linear-gradient(135deg, rgba(6, 38, 32, .95), rgba(7, 24, 51, .92)) !important;
    border-color: rgba(16, 185, 129, .35) !important;
    border-left: 4px solid #10b981 !important;
    color: #e2e8f0 !important;
}

body.dark-mode .summary-card h4 {
    color: #34d399 !important;
}

body.dark-mode .comparison-table-wrap,
body.dark-mode .doc-table-wrap,
body.dark-mode .table-responsive-wrapper {
    background: linear-gradient(135deg, rgba(8, 20, 42, .96), rgba(5, 28, 32, .94)) !important;
    border-color: rgba(16, 185, 129, .30) !important;
}

body.dark-mode .comparison-table-wrap thead th,
body.dark-mode .doc-table-wrap thead th,
body.dark-mode .ai-section-card thead th {
    background: linear-gradient(135deg, rgba(6, 78, 59, .75), rgba(8, 35, 68, .75)) !important;
    color: #f8fafc !important;
    border-color: rgba(16, 185, 129, .25) !important;
}

body.dark-mode .comparison-table-wrap tbody td,
body.dark-mode .doc-table-wrap tbody td,
body.dark-mode .ai-section-card tbody td {
    color: #cbd5e1 !important;
    border-color: rgba(255, 255, 255, .08) !important;
}

body.dark-mode .comparison-table-wrap tbody tr:nth-child(even),
body.dark-mode .doc-table-wrap tbody tr:nth-child(even),
body.dark-mode .ai-section-card tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, .03) !important;
}

body.dark-mode .comparison-table-wrap tbody tr:hover,
body.dark-mode .doc-table-wrap tbody tr:hover,
body.dark-mode .ai-section-card tbody tr:hover {
    background: rgba(16, 185, 129, .10) !important;
}

body.dark-mode .next-card-title {
    color: #34d399 !important;
    background: linear-gradient(135deg, rgba(16, 185, 129, .18), rgba(6, 182, 212, .18)) !important;
    border-color: rgba(52, 211, 153, .30) !important;
}

