/* Google NotebookLM Design System - DMTrade */
:root {
    --ai-ink: #0f172a;
    --ai-blue: #1d4ed8;
    --ai-google-blue: #1a73e8;
    --ai-indigo: #3b82f6;
    --ai-purple: #6366f1;
    --ai-cyan: #0891b2;
    --ai-sky: #38bdf8;
    --ai-teal: #06b6d4;
    --ai-green: #059669;
    --ai-mint: #10b981;
    --ai-lime: #65a30d;
    --ai-gold: #f59e0b;
    --ai-red: #dc2626;
    --mission-sticky-top: 60px;
    --mission-scroll-offset: 70px;
}

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

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

body.bg-white {
    background:
        radial-gradient(circle at top right, rgba(8, 145, 178, .12), transparent 30%),
        radial-gradient(circle at 0 18%, rgba(29, 78, 216, .10), transparent 28%),
        radial-gradient(circle at 85% 70%, rgba(16, 185, 129, .08), transparent 32%),
        linear-gradient(180deg, #f0f9ff 0%, #ffffff 42%, #f8fafc 100%);
}

/* ==========================================================================
   Hero Section - NotebookLM Cyber-Slate & Electric Blue
   ========================================================================== */
.ai-hero {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(56, 189, 248, .35);
    border-radius: 25px;
    padding: 20px 18px 19px;
    margin-top: 6px;
    color: #fff;
    background:
        radial-gradient(circle at 92% 12%, rgba(6, 182, 212, .38), transparent 30%),
        radial-gradient(circle at 8% 105%, rgba(29, 78, 216, .35), transparent 35%),
        linear-gradient(135deg, #020617 0%, #081b33 46%, #0f2557 100%);
    box-shadow: 0 18px 42px rgba(2, 6, 23, .38), inset 0 1px 0 rgba(255, 255, 255, .15);
}

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

.ai-hero::before { 
    top: -68px; 
    right: 48px; 
    width: 140px; 
    height: 140px; 
    border: 1px solid rgba(56, 189, 248, .22);
    background: radial-gradient(circle, rgba(6, 182, 212, .12), transparent 70%);
}

.ai-hero::after { 
    bottom: -86px; 
    left: 28px; 
    width: 200px; 
    height: 200px; 
    border: 1px solid rgba(29, 78, 216, .24);
    background: radial-gradient(circle, rgba(29, 78, 216, .15), transparent 70%);
}

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

.ai-pill,
.duration-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .03em;
}

.ai-pill {
    padding: 8px 14px;
    margin-bottom: 13px;
    color: #e0f2fe;
    background: rgba(8, 145, 178, .24);
    border: 1px solid rgba(56, 189, 248, .45);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 0 15px rgba(8, 145, 178, .20);
    backdrop-filter: blur(12px);
}

.duration-pill {
    margin-top: 13px;
    padding: 7px 12px;
    color: #bae6fd;
    background: rgba(15, 37, 87, .45);
    border: 1px solid rgba(56, 189, 248, .30);
}

.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 18px rgba(2, 6, 23, .65);
}

.ai-author-row { color: rgba(224, 242, 254, .85) !important; }
.ai-author-row a { color: #38bdf8 !important; font-weight: 700; }
.ai-hero .lead { color: rgba(240, 249, 255, .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: 14px;
    border-top: 1px solid rgba(56, 189, 248, .20);
}

.hero-mission-info { display: flex; align-items: center; gap: 10px; min-width: 0; }
.hero-mission-info > ion-icon { flex: 0 0 auto; color: #38bdf8; font-size: 25px; filter: drop-shadow(0 0 10px rgba(56, 189, 248, .8)); }
.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(224, 242, 254, .80); font-size: 11px; line-height: 1.35; }
.hero-xp {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 2px;
    color: #fde047;
    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, .32);
    border-radius: 12px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    background: linear-gradient(135deg, #0891b2, #2563eb 55%, #1d4ed8);
    box-shadow: 0 8px 22px rgba(8, 145, 178, .35);
    transition: transform .18s ease, box-shadow .18s ease;
}

.mission-start:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 26px rgba(8, 145, 178, .48);
    color: #fff;
}

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

/* ==========================================================================
   Mission Console Shell & Header Bar
   ========================================================================== */
.mission-console-shell { 
    margin: 12px 16px 17px; 
    position: relative;
}

.mission-console {
    position: relative;
    z-index: 12;
    overflow: hidden;
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    padding: 13px 15px;
    border: 1px solid rgba(56, 189, 248, .35);
    border-radius: 20px;
    color: #f8fbff;
    background:
        radial-gradient(circle at 91% 8%, rgba(6, 182, 212, .32), transparent 35%),
        linear-gradient(135deg, rgba(2, 6, 23, .90), rgba(8, 27, 51, .88) 55%, rgba(15, 37, 87, .90));
    box-shadow: 0 18px 38px rgba(2, 6, 23, .40), inset 0 1px rgba(255, 255, 255, .18);
    backdrop-filter: blur(22px) saturate(160%);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
}

.mission-console.is-pinned {
    position: fixed;
    top: var(--mission-sticky-top, 60px);
    left: var(--mission-fixed-left, 16px);
    width: var(--mission-fixed-width, calc(100vw - 32px));
    margin: 0;
    z-index: 999;
    box-shadow: 0 20px 45px rgba(0, 0, 0, .55), inset 0 1px rgba(255, 255, 255, .25);
}

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

.mission-console > * { position: relative; z-index: 1; }
[data-mission-checkpoint] { scroll-margin-top: var(--mission-scroll-offset); }

.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: #bae6fd; font-size: 12px; font-weight: 800; letter-spacing: .06em; }
.mission-label ion-icon { color: #38bdf8; font-size: 18px; }
.mission-status { color: rgba(224, 242, 254, .82); font-size: 11px; font-weight: 700; text-align: right; }
.mission-status b { color: #38bdf8; }

.mission-progress-track { width: 100%; height: 7px; margin: 10px 0 11px; overflow: hidden; border-radius: 999px; background: rgba(255, 255, 255, .13); box-shadow: inset 0 1px 3px rgba(0, 0, 0, .3); }
.mission-progress-fill { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #0891b2, #38bdf8 45%, #2563eb 80%, #10b981); box-shadow: 0 0 15px rgba(56, 189, 248, .75); 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, .12);
    border-radius: 999px;
    color: rgba(224, 242, 254, .85);
    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(56, 189, 248, .6); color: #fff; }
.mission-stage:focus-visible { outline: 3px solid #38bdf8; outline-offset: 2px; }
.mission-stage .stage-number { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; color: #bae6fd; font-size: 9.5px; font-weight: 800; background: rgba(8, 145, 178, .35); transition: background .2s ease, color .2s ease; }

.mission-stage.is-visited,
.mission-stage.is-completed { border-color: rgba(56, 189, 248, .42); color: #fff; background: rgba(8, 145, 178, .22); }
.mission-stage.is-visited .stage-number,
.mission-stage.is-completed .stage-number { color: #fff; background: #0891b2; }

.mission-stage.is-active,
.mission-stage.active {
    border-color: #38bdf8 !important;
    color: #fff !important;
    background: linear-gradient(135deg, rgba(8, 145, 178, .65), rgba(37, 99, 235, .55)) !important;
    box-shadow: 0 0 16px rgba(56, 189, 248, .55), inset 0 0 10px rgba(255, 255, 255, .2) !important;
    transform: translateY(-2px);
}

.mission-stage.is-active .stage-number,
.mission-stage.active .stage-number {
    color: #fff !important;
    background: linear-gradient(135deg, #0891b2, #38bdf8) !important;
    box-shadow: 0 0 8px rgba(56, 189, 248, .9) !important;
}

/* ==========================================================================
   Section Cards & Typography
   ========================================================================== */
.ai-section-card,
figure,
.blog-card {
    border: 1px solid rgba(56, 189, 248, .18);
    background: rgba(255, 255, 255, .90);
    box-shadow: 0 14px 32px rgba(15, 23, 42, .06);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.ai-section-card {
    border-radius: 22px;
    padding: 19px 18px;
    margin-top: 14px;
}

.lesson-highlight {
    position: relative;
    overflow: hidden;
    margin: 14px 0;
    padding: 16px 18px;
    border-left: 4px solid #0891b2;
    border-top: 1px solid rgba(56, 189, 248, .20);
    border-right: 1px solid rgba(56, 189, 248, .20);
    border-bottom: 1px solid rgba(56, 189, 248, .20);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(240, 249, 255, .98), rgba(248, 250, 252, .96));
    box-shadow: 0 8px 24px rgba(8, 145, 178, .07);
}

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

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

.lesson-note,
.lesson-summary-box,
.beginner-box {
    position: relative;
    border-radius: 18px;
    padding: 17px;
    margin: 18px 0;
}

.lesson-note {
    border: 1px solid rgba(245, 158, 11, .28);
    background: linear-gradient(135deg, rgba(255, 251, 235, .98), rgba(254, 243, 199, .90));
    box-shadow: 0 10px 25px rgba(245, 158, 11, .08);
}

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

.lesson-summary-box {
    border: 1px solid rgba(56, 189, 248, .28);
    background: linear-gradient(135deg, rgba(240, 249, 255, .98), rgba(238, 242, 255, .96));
    box-shadow: 0 12px 28px rgba(8, 145, 178, .08);
}

.lesson-summary-box::before {
    content: "🧠 សង្ខេបមេរៀន ";
    display: block;
    margin-bottom: 8px;
    color: #0891b2;
    font-size: 12px;
    font-weight: 800;
}

.beginner-box {
    border: 1px solid rgba(37, 99, 235, .24);
    background: linear-gradient(135deg, rgba(239, 246, 255, .98), rgba(236, 254, 255, .97));
    box-shadow: 0 12px 28px rgba(37, 99, 235, .08);
}

.beginner-box::before {
    content: "🚀 សម្រាប់អ្នកចាប់ផ្តើម ";
    display: block;
    margin-bottom: 8px;
    color: var(--ai-blue);
    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: 5px; }
#appCapsule h2 { font-size: 23px; font-weight: 800; }

#appCapsule h3 {
    position: relative;
    margin-top: 23px;
    margin-bottom: 10px;
    padding-left: 14px;
    color: var(--ai-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, #0891b2, #1d4ed8);
}

#appCapsule h3:nth-of-type(4n+2)::before { background: linear-gradient(180deg, #1d4ed8, #06b6d4); }
#appCapsule h3:nth-of-type(4n+3)::before { background: linear-gradient(180deg, #059669, #10b981); }
#appCapsule h3:nth-of-type(4n)::before { background: linear-gradient(180deg, #0891b2, #38bdf8); }

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 24px rgba(15, 23, 42, .15);
}

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

.definition-card,
.ability-card,
.comparison-card {
    padding: 15px;
    border: 1px solid rgba(56, 189, 248, .18);
    border-radius: 16px;
    background: linear-gradient(145deg, #ffffff, #f8fbff);
    box-shadow: 0 6px 18px rgba(15, 23, 42, .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(--ai-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(--ai-cyan); }
.definition-card:nth-child(2) ion-icon { color: var(--ai-blue); }
.definition-card:nth-child(3) ion-icon { color: var(--ai-teal); }
.definition-card:nth-child(4) ion-icon { color: var(--ai-green); }

.ability-card.can { border-color: rgba(5,150,105,.22); background: linear-gradient(145deg, #f0fdf4, #f7fffb); }
.ability-card.cannot { border-color: rgba(220,38,38,.20); background: linear-gradient(145deg, #fff7f7, #fff); }
.ability-card.can ion-icon { color: var(--ai-green); }
.ability-card.cannot ion-icon { color: var(--ai-red); }

.comparison-card.program { border-color: rgba(37,99,235,.20); }
.comparison-card.ai { border-color: rgba(8,145,178,.22); }
.comparison-card.program ion-icon { color: var(--ai-blue); }
.comparison-card.ai ion-icon { color: var(--ai-cyan); }

.example-list { display: grid; gap: 9px; margin: 14px 0; }
.example-item { display: flex; gap: 11px; align-items: flex-start; padding: 12px; border-radius: 15px; background: #f8fafc; border: 1px solid rgba(56, 189, 248, .15); }
.example-icon { flex: 0 0 auto; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; color: #fff; background: linear-gradient(135deg, #0891b2, #1d4ed8); }
.example-item:nth-child(2) .example-icon { background: linear-gradient(135deg, #06b6d4, #2563eb); }
.example-item:nth-child(3) .example-icon { background: linear-gradient(135deg, #059669, #10b981); }
.example-item:nth-child(4) .example-icon { background: linear-gradient(135deg, #0891b2, #6366f1); }
.example-item strong { display: block; color: var(--ai-ink); font-size: 15px; }
.example-item span { display: block; margin-top: 2px; color: #475569; font-size: 13px; line-height: 1.6; }

/* Prompt Box */
.prompt-box {
    position: relative;
    overflow: hidden;
    margin-top: 13px;
    padding: 18px 16px;
    border: 1px solid rgba(56, 189, 248, .30);
    border-radius: 18px;
    color: #e0f2fe;
    background: linear-gradient(135deg, #020617 0%, #081b33 55%, #0f2557 100%);
    box-shadow: 0 12px 28px rgba(2, 6, 23, .30);
}

.prompt-box::after { content: ""; position: absolute; top: -65px; right: -45px; width: 160px; height: 160px; border-radius: 50%; background: rgba(56, 189, 248, .12); }
.prompt-box > * { position: relative; z-index: 1; }
.prompt-label { display: flex; align-items: center; gap: 7px; color: #38bdf8; 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 14px;
    border: 0;
    border-radius: 11px;
    color: #020617;
    font-family: "Kantumruy Pro", sans-serif;
    font-size: 13px;
    font-weight: 800;
    background: linear-gradient(135deg, #38bdf8, #7dd3fc);
    box-shadow: 0 4px 14px rgba(56, 189, 248, .3);
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease;
}

.copy-btn:hover,
.reveal-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(56, 189, 248, .45);
}

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

/* ==========================================================================
   Interactive Lab - Signature Google NotebookLM Workspace
   ========================================================================== */
.ai-lab {
    position: relative;
    overflow: hidden;
    margin-top: 14px;
    padding: 19px 17px;
    border: 1px solid rgba(56, 189, 248, .32);
    border-radius: 22px;
    color: #fff;
    background:
        radial-gradient(circle at 94% 8%, rgba(8, 145, 178, .38), transparent 30%),
        radial-gradient(circle at 9% 96%, rgba(29, 78, 216, .35), transparent 32%),
        linear-gradient(135deg, #020617 0%, #081b33 50%, #0f2557 100%);
    box-shadow: 0 18px 42px rgba(2, 6, 23, .45), 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(56, 189, 248, .20);
    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: #38bdf8; 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 10px; border: 1px solid rgba(56, 189, 248, .40); border-radius: 999px; color: #bae6fd; font-size: 10px; font-weight: 800; background: rgba(8, 145, 178, .35); }
.lab-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #38bdf8; box-shadow: 0 0 10px #38bdf8; }
.lab-description { margin: 10px 0 14px; color: rgba(224, 242, 254, .88); 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(56, 189, 248, .20);
    border-radius: 14px;
    color: #f8fbff;
    font-family: "Kantumruy Pro", sans-serif;
    text-align: left;
    background: rgba(255, 255, 255, .07);
    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: #38bdf8; 
    background: linear-gradient(135deg, rgba(8, 145, 178, .35), rgba(37, 99, 235, .25)); 
    box-shadow: 0 10px 22px rgba(8, 145, 178, .25); 
}

.lab-input:focus-visible { outline: 3px solid #38bdf8; outline-offset: 2px; }
.lab-input ion-icon { color: #38bdf8; 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(224, 242, 254, .72); 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,
.lab-brain { display: grid; place-items: center; align-content: center; min-height: 116px; padding: 10px 6px; border: 1px solid rgba(56, 189, 248, .22); border-radius: 15px; text-align: center; background: rgba(255, 255, 255, .08); }
.lab-node ion-icon { margin-bottom: 6px; color: #38bdf8; font-size: 25px; }
.lab-node strong,
.lab-core strong,
.lab-brain strong { display: block; color: #fff; font-size: 12px; line-height: 1.4; }
.lab-node small,
.lab-core small,
.lab-brain small { display: block; margin-top: 3px; color: rgba(224, 242, 254, .70); font-size: 9px; line-height: 1.35; }

.lab-core,
.lab-brain { 
    position: relative; 
    overflow: hidden; 
    border-color: rgba(56, 189, 248, .45); 
    background: radial-gradient(circle at 50% 18%, rgba(8, 145, 178, .38), rgba(37, 99, 235, .20) 45%, rgba(255, 255, 255, .06) 71%); 
}

.lab-core ion-icon,
.lab-brain ion-icon { margin-bottom: 6px; color: #e0f2fe; font-size: 31px; filter: drop-shadow(0 0 10px rgba(56, 189, 248, .8)); transition: transform .3s ease, filter .3s ease; }
.lab-core::after,
.lab-brain::after { content: ""; position: absolute; width: 74px; height: 74px; border: 1px solid rgba(56, 189, 248, .38); border-radius: 50%; pointer-events: none; }
.lab-arrow { display: grid; place-items: center; color: #38bdf8; font-size: 20px; text-shadow: 0 0 12px rgba(56, 189, 248, .75); }
.lab-result { margin-top: 11px; padding: 11px 13px; border: 1px solid rgba(16, 185, 129, .30); border-radius: 13px; color: #d1fae5; font-size: 13px; line-height: 1.65; background: rgba(6, 78, 59, .35); transition: all .3s ease; }
.lab-result b { color: #6ee7b7; }

.lab-status.is-busy {
    background: rgba(56, 189, 248, .35) !important;
    color: #38bdf8 !important;
    box-shadow: 0 0 14px rgba(56, 189, 248, .7) !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(56, 189, 248, .6)); }
    50% { transform: scale(1.18); filter: brightness(1.35) drop-shadow(0 0 25px rgba(56, 189, 248, 1)); } 
    100% { transform: scale(1); filter: drop-shadow(0 0 9px rgba(56, 189, 248, .6)); }
}
@keyframes labFlow { 
    0% { opacity: .3; transform: translateX(-5px); }
    50% { opacity: 1; transform: translateX(7px); color: #38bdf8; text-shadow: 0 0 18px rgba(56, 189, 248, 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); }
}
@keyframes labNodeShimmer {
    0% { transform: scale(0.96); border-color: rgba(56, 189, 248, .2); }
    50% { transform: scale(1.04); border-color: rgba(56, 189, 248, .75); box-shadow: 0 0 20px rgba(56, 189, 248, .45); }
    100% { transform: scale(1); border-color: rgba(255, 255, 255, .15); }
}

.ai-lab {
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.ai-lab.is-processing {
    border-color: rgba(56, 189, 248, .6) !important;
    box-shadow: 0 20px 48px rgba(8, 145, 178, .3), inset 0 1px rgba(255, 255, 255, .25) !important;
}
.ai-lab.is-processing .lab-core ion-icon,
.ai-lab.is-processing .lab-brain ion-icon { animation: labPulse .6s ease-in-out infinite; }
.ai-lab.is-processing .lab-core::after,
.ai-lab.is-processing .lab-brain::after {
    border-style: dashed;
    border-color: rgba(56, 189, 248, .75);
    animation: labCoreRotate 2s linear infinite;
}
.ai-lab.is-processing .lab-arrow { animation: labFlow .5s ease-in-out infinite; }
.ai-lab.is-processing .lab-node { animation: labNodeShimmer .6s ease-in-out 1; }
.lab-result.is-animating { animation: labResultPop .45s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

/* ==========================================================================
   Knowledge Check Quiz Section
   ========================================================================== */
.check-card { 
    margin-top: 15px; 
    padding: 17px; 
    border: 1px solid rgba(56, 189, 248, .28); 
    border-radius: 18px; 
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe); 
    box-shadow: 0 10px 24px rgba(8, 145, 178, .07); 
}

.check-kicker { display: flex; align-items: center; gap: 7px; color: #0891b2; font-size: 12px; font-weight: 800; letter-spacing: .05em; }
.check-question { margin: 8px 0 11px; color: var(--ai-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(56, 189, 248, .22); 
    border-radius: 12px; 
    color: #1e293b; 
    background: rgba(255, 255, 255, .92); 
    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: #0891b2; 
    box-shadow: 0 6px 15px rgba(8, 145, 178, .12); 
}

.answer-option:focus-visible { outline: 3px solid #38bdf8; outline-offset: 2px; }
.answer-option.is-correct { color: #14532d !important; border-color: rgba(22, 163, 74, .55) !important; background: #ecfdf5 !important; font-weight: 700; }
.answer-option.is-incorrect { color: #991b1b !important; border-color: rgba(239, 68, 68, .50) !important; background: #fff1f2 !important; }

.check-answer { display: none; margin-top: 11px; padding: 12px 14px; border-radius: 12px; color: #166534; background: #f0fdf4; border: 1px solid rgba(22,163,74,.25); 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, .28); background: #fff1f2; }

/* Source Note Grounding Box */
.source-box {
    padding: 16px 18px;
    border-left: 4px solid #0891b2;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(240, 249, 255, .96), rgba(248, 250, 252, .95));
    border-top: 1px solid rgba(56, 189, 248, .18);
    border-right: 1px solid rgba(56, 189, 248, .18);
    border-bottom: 1px solid rgba(56, 189, 248, .18);
    color: #334155;
    font-size: 14px;
    line-height: 1.7;
    margin: 14px 0;
}
.source-box b { color: #0891b2; }
.source-box a { color: #1d4ed8; text-decoration: underline; }

.flow-list { counter-reset: step; display: grid; gap: 12px; margin: 14px 0; }
.flow-list div {
    position: relative;
    padding: 14px 15px 14px 58px;
    border-radius: 15px;
    background: linear-gradient(135deg, rgba(240, 249, 255, .96), rgba(248, 250, 252, .98));
    border: 1px solid rgba(56, 189, 248, .20);
    box-shadow: 0 6px 16px rgba(8, 145, 178, .05);
    color: #334155;
    font-size: 15px;
    line-height: 1.7;
}
.flow-list div b, .flow-list div strong { color: var(--ai-ink); }
.flow-list div:before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 15px;
    top: 12px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #0891b2, #1d4ed8);
    color: #fff;
    font-weight: 800;
    font-size: 13px;
    box-shadow: 0 4px 12px rgba(8, 145, 178, .25);
}

.file-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(205px, 1fr)); gap: 14px; margin: 14px 0; }
.file-card {
    padding: 18px;
    border: 1px solid rgba(56, 189, 248, .22);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(240, 249, 255, .98), rgba(248, 250, 252, .96));
    box-shadow: 0 8px 20px rgba(8, 145, 178, .06);
}
.file-card ion-icon { font-size: 30px; color: #0891b2; }
.file-card strong { display: block; color: var(--ai-ink); font-size: 15px; margin-top: 4px; }
.file-card span { display: block; margin-top: 7px; color: #475569; font-size: 13px; line-height: 1.6; }

.route-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin: 14px 0; }
.route-card {
    padding: 18px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(240, 249, 255, .98), rgba(238, 242, 255, .96));
    border: 1px solid rgba(56, 189, 248, .20);
    box-shadow: 0 8px 20px rgba(8, 145, 178, .06);
}
.route-card ion-icon { font-size: 30px; color: #1d4ed8; }
.route-card strong { display: block; color: var(--ai-ink); font-size: 15px; margin-top: 4px; }
.route-card span { display: block; margin-top: 7px; color: #475569; font-size: 13px; line-height: 1.6; }

/* ==========================================================================
   Modern Responsive Document Table Styling
   ========================================================================== */
.comparison-table-wrap,
.doc-table-wrap,
.table-responsive-wrapper {
    position: relative;
    width: 100%;
    margin: 18px 0 22px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.95));
    border: 1px solid rgba(56, 189, 248, 0.28);
    box-shadow: 0 10px 28px -6px rgba(2, 6, 23, 0.08), 0 0 0 1px rgba(14, 165, 233, 0.12);
    backdrop-filter: blur(14px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.comparison-table-wrap::-webkit-scrollbar,
.doc-table-wrap::-webkit-scrollbar {
    height: 6px;
}
.comparison-table-wrap::-webkit-scrollbar-track,
.doc-table-wrap::-webkit-scrollbar-track {
    background: rgba(241, 245, 249, 0.6);
    border-radius: 999px;
}
.comparison-table-wrap::-webkit-scrollbar-thumb,
.doc-table-wrap::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #0284c7, #06b6d4);
    border-radius: 999px;
}

.comparison-table-wrap table,
.doc-table-wrap table,
.doc-table,
.decision-table,
.ai-section-card table {
    width: 100%;
    margin: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border: none !important;
    font-family: 'Kantumruy Pro', -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-size: 13.5px;
    line-height: 1.65;
    color: #1e293b;
}

/* Table Header */
.comparison-table-wrap thead,
.doc-table-wrap thead,
.ai-section-card thead {
    background: linear-gradient(135deg, #091e3a 0%, #0f3764 45%, #0e7490 100%) !important;
    color: #ffffff !important;
}

.comparison-table-wrap thead tr,
.doc-table-wrap thead tr,
.ai-section-card thead tr {
    background: transparent !important;
    border: none !important;
}

.comparison-table-wrap thead th,
.doc-table-wrap thead th,
.ai-section-card thead th {
    padding: 15px 18px !important;
    color: #ffffff !important;
    font-family: 'Kantumruy Pro', sans-serif !important;
    font-weight: 700 !important;
    font-size: 13.5px !important;
    letter-spacing: 0.3px;
    text-align: left;
    vertical-align: middle;
    border: none !important;
    border-bottom: 2.5px solid #38bdf8 !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
    white-space: nowrap;
}

.comparison-table-wrap thead th ion-icon,
.doc-table-wrap thead th ion-icon {
    font-size: 16px;
    vertical-align: -2px;
    margin-right: 6px;
    color: #38bdf8;
}

.comparison-table-wrap thead th:first-child,
.doc-table-wrap thead th:first-child {
    border-top-left-radius: 15px;
}
.comparison-table-wrap thead th:last-child,
.doc-table-wrap thead th:last-child {
    border-top-right-radius: 15px;
}

/* Table Body */
.comparison-table-wrap tbody tr,
.doc-table-wrap tbody tr,
.ai-section-card tbody tr {
    background: transparent;
    transition: background-color 0.2s ease, transform 0.15s ease;
}

.comparison-table-wrap tbody tr:nth-child(even),
.doc-table-wrap tbody tr:nth-child(even),
.ai-section-card tbody tr:nth-child(even) {
    background-color: rgba(240, 249, 255, 0.5);
}

.comparison-table-wrap tbody tr:hover,
.doc-table-wrap tbody tr:hover,
.ai-section-card tbody tr:hover {
    background-color: rgba(14, 165, 233, 0.08) !important;
}

.comparison-table-wrap tbody td,
.doc-table-wrap tbody td,
.ai-section-card tbody td {
    padding: 13px 18px !important;
    font-size: 13.5px;
    line-height: 1.65;
    color: #334155;
    vertical-align: middle;
    border: none !important;
    border-bottom: 1px solid rgba(226, 232, 240, 0.85) !important;
    font-family: 'Kantumruy Pro', sans-serif !important;
}

.comparison-table-wrap tbody tr:last-child td,
.doc-table-wrap tbody tr:last-child td,
.ai-section-card tbody tr:last-child td {
    border-bottom: none !important;
}

.comparison-table-wrap tbody tr:last-child td:first-child,
.doc-table-wrap tbody tr:last-child td:first-child {
    border-bottom-left-radius: 15px;
}
.comparison-table-wrap tbody tr:last-child td:last-child,
.doc-table-wrap tbody tr:last-child td:last-child {
    border-bottom-right-radius: 15px;
}

/* Status Badges within Tables */
.table-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.3px;
    white-space: nowrap;
}
.table-badge.badge-danger {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.28);
}
.table-badge.badge-warning {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.28);
}
.table-badge.badge-success {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.28);
}
.table-badge.badge-info {
    background: rgba(2, 132, 199, 0.12);
    color: #0284c7;
    border: 1px solid rgba(2, 132, 199, 0.28);
}
.table-badge.badge-purple {
    background: rgba(139, 92, 246, 0.12);
    color: #7c3aed;
    border: 1px solid rgba(139, 92, 246, 0.28);
}

/* Dark Mode Table Theme */
body.dark-mode .comparison-table-wrap,
body.dark-mode .doc-table-wrap,
body.dark-mode .table-responsive-wrapper {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(20, 30, 50, 0.92));
    border-color: rgba(56, 189, 248, 0.25);
    box-shadow: 0 14px 34px -8px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(56, 189, 248, 0.18);
}

body.dark-mode .comparison-table-wrap::-webkit-scrollbar-track,
body.dark-mode .doc-table-wrap::-webkit-scrollbar-track {
    background: rgba(30, 41, 59, 0.6);
}

body.dark-mode .comparison-table-wrap thead,
body.dark-mode .doc-table-wrap thead,
body.dark-mode .ai-section-card thead {
    background: linear-gradient(135deg, #030712 0%, #0c2340 50%, #083344 100%) !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 {
    color: #7dd3fc !important;
    border-bottom: 2.5px solid #0284c7 !important;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

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: #e2e8f0 !important;
    border-bottom: 1px solid rgba(51, 65, 85, 0.65) !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-color: rgba(30, 41, 59, 0.42);
}

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-color: rgba(14, 165, 233, 0.15) !important;
}

body.dark-mode .table-badge.badge-danger {
    background: rgba(239, 68, 68, 0.22);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.4);
}
body.dark-mode .table-badge.badge-warning {
    background: rgba(245, 158, 11, 0.22);
    color: #fcd34d;
    border-color: rgba(245, 158, 11, 0.4);
}
body.dark-mode .table-badge.badge-success {
    background: rgba(16, 185, 129, 0.22);
    color: #6ee7b7;
    border-color: rgba(16, 185, 129, 0.4);
}
body.dark-mode .table-badge.badge-info {
    background: rgba(2, 132, 199, 0.22);
    color: #7dd3fc;
    border-color: rgba(2, 132, 199, 0.4);
}
body.dark-mode .table-badge.badge-purple {
    background: rgba(139, 92, 246, 0.22);
    color: #c4b5fd;
    border-color: rgba(139, 92, 246, 0.4);
}

/* ==========================================================================
   Mission Completion Card
   ========================================================================== */
.mission-complete {
    position: relative;
    overflow: hidden;
    margin: 18px 0 2px;
    padding: 20px 18px;
    border: 1px solid rgba(56, 189, 248, .35);
    border-radius: 22px;
    color: #eaf7ff;
    background:
        radial-gradient(circle at 91% 13%, rgba(8, 145, 178, .38), transparent 28%),
        radial-gradient(circle at 12% 92%, rgba(29, 78, 216, .30), transparent 30%),
        linear-gradient(135deg, #020617 0%, #081b33 50%, #0f2557 100%);
    box-shadow: 0 18px 40px rgba(2, 6, 23, .35);
    transition: border-color .35s ease, box-shadow .35s ease, transform .35s ease;
}

.mission-complete::after { content: ""; position: absolute; top: -88px; right: -54px; width: 198px; height: 198px; border: 1px solid rgba(56, 189, 248, .18); border-radius: 50%; pointer-events: none; }
.mission-complete > * { position: relative; z-index: 1; }
.completion-top { display: flex; align-items: flex-start; gap: 12px; }
.completion-orbit { display: grid; place-items: center; flex: 0 0 auto; width: 47px; height: 47px; border: 1px solid rgba(56, 189, 248, .35); border-radius: 50%; color: #fde047; font-size: 25px; background: radial-gradient(circle at 36% 26%, rgba(255, 255, 255, .30), rgba(8, 145, 178, .40) 50%, rgba(15, 37, 87, .75)); box-shadow: 0 0 0 7px rgba(255, 255, 255, .05), 0 0 27px rgba(8, 145, 178, .35); }
.completion-kicker { color: #38bdf8; font-size: 11px; font-weight: 800; letter-spacing: .10em; }
.mission-complete h2 { margin: 3px 0 0; color: #fff; font-size: 22px !important; font-weight: 800; line-height: 1.45; }
.mission-complete p { margin: 10px 0 14px; color: rgba(224, 242, 254, .82); font-size: 14px !important; line-height: 1.72 !important; }
.completion-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.completion-badge { display: inline-flex; align-items: center; gap: 6px; min-width: 0; color: #fde047; font-size: 11px; font-weight: 800; }
.completion-badge ion-icon { color: #38bdf8; font-size: 17px; }

.completion-cta { 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    gap: 6px; 
    min-height: 39px; 
    padding: 8px 14px; 
    border: 1px solid rgba(255, 255, 255, .25); 
    border-radius: 12px; 
    color: #ffffff; 
    font-size: 12px; 
    font-weight: 800; 
    background: linear-gradient(135deg, #0891b2, #2563eb); 
    box-shadow: 0 8px 19px rgba(8, 145, 178, .30); 
    transition: transform .18s ease;
}

.completion-cta:hover { transform: translateY(-1px); color: #fff; }
.completion-cta ion-icon { font-size: 17px; }

.mission-complete.is-unlocked { border-color: #38bdf8; box-shadow: 0 0 0 1px rgba(56, 189, 248, .25), 0 20px 48px rgba(8, 145, 178, .40); transform: translateY(-2px); }
.mission-complete.is-unlocked .completion-orbit { color: #fff; background: radial-gradient(circle at 36% 26%, rgba(255, 255, 255, .34), rgba(56, 189, 248, .50) 51%, rgba(29, 78, 216, .75)); }

/* ==========================================================================
   Bottom Navigation & Blog Cards
   ========================================================================== */
.next-card-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    padding: 8px 14px;
    border: 1px solid rgba(56, 189, 248, .22);
    border-radius: 999px;
    color: #0891b2;
    background: linear-gradient(135deg, rgba(8, 145, 178, .10), rgba(37, 99, 235, .10));
    font-weight: 800;
}

.blog-card { overflow: hidden; border-radius: 18px; transition: transform .25s ease, box-shadow .25s ease; }
.blog-card:hover { transform: translateY(-3px); box-shadow: 0 18px 30px rgba(8, 145, 178, .14); }
.blog-card > img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.blog-card .text { padding: 12px 12px 14px; }
.blog-card .title { margin: 0; color: var(--ai-ink); font-size: 16px; line-height: 1.7; }

.lesson-navigation .row { align-items: stretch; }
.lesson-navigation .col-6 { display: flex; }
.lesson-navigation .col-6 > a { display: flex; width: 100%; height: 100%; }
.lesson-navigation .blog-card { display: flex; flex-direction: column; width: 100%; height: 100% !important; min-height: 0 !important; }
.lesson-navigation .blog-card > img { display: block; flex: 0 0 auto; width: 100%; max-width: 100%; height: auto; aspect-ratio: auto; object-fit: contain; }
.lesson-navigation .blog-card .text { position: static !important; flex: 1 0 auto; height: auto !important; min-height: 0 !important; max-height: none !important; overflow: visible !important; }
.lesson-navigation .blog-card .title { display: block !important; height: auto !important; min-height: 0 !important; max-height: none !important; overflow: visible !important; white-space: normal !important; overflow-wrap: anywhere; text-overflow: clip !important; line-height: 1.65; min-height: calc(1.65em * 3) !important; }

/* ==========================================================================
   Dark Mode Overrides - NotebookLM Cyber Obsidian Space
   ========================================================================== */
body.dark-mode.bg-white {
    background:
        radial-gradient(circle at 95% 4%, rgba(8, 145, 178, .18), transparent 30%),
        radial-gradient(circle at 0 30%, rgba(29, 78, 216, .16), transparent 30%),
        linear-gradient(180deg, #030712 0%, #081120 50%, #030712 100%);
}

body.dark-mode .mission-console {
    border-color: rgba(56, 189, 248, .35);
    background:
        radial-gradient(circle at 91% 8%, rgba(8, 145, 178, .30), transparent 35%),
        linear-gradient(135deg, rgba(2, 6, 23, .85), rgba(8, 27, 51, .80) 58%, rgba(15, 37, 87, .85));
    box-shadow: 0 18px 42px rgba(0, 0, 0, .55), inset 0 1px rgba(255, 255, 255, .15);
}

body.dark-mode .ai-section-card,
body.dark-mode figure,
body.dark-mode .blog-card {
    background: linear-gradient(145deg, rgba(8, 17, 32, .96), rgba(15, 27, 51, .94));
    border-color: rgba(56, 189, 248, .22);
    box-shadow: inset 0 1px rgba(255, 255, 255, .05), 0 16px 34px rgba(0, 0, 0, .35);
}

body.dark-mode .lesson-media { background: linear-gradient(145deg, #030712, #081120); }
body.dark-mode .lesson-media img { box-shadow: 0 12px 28px rgba(0, 0, 0, .50); }

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,
body.dark-mode .answer-option {
    color: #e0f2fe;
}

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: #f8fbff;
}

body.dark-mode .lesson-highlight {
    background: linear-gradient(135deg, rgba(8, 27, 51, .94), rgba(15, 37, 87, .90));
    border-color: rgba(56, 189, 248, .25);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .25);
}

body.dark-mode .lesson-note {
    color: #fef3c7;
    background: linear-gradient(135deg, rgba(120, 53, 15, .50), rgba(146, 64, 14, .45));
    border-color: rgba(245, 158, 11, .35);
}

body.dark-mode .lesson-summary-box {
    background: linear-gradient(135deg, rgba(8, 27, 51, .92), rgba(15, 37, 87, .88));
    border-color: rgba(56, 189, 248, .28);
}

body.dark-mode .beginner-box {
    background: linear-gradient(135deg, rgba(8, 27, 51, .90), rgba(15, 37, 87, .85));
    border-color: rgba(56, 189, 248, .25);
}

body.dark-mode .definition-card,
body.dark-mode .comparison-card,
body.dark-mode .example-item {
    background: linear-gradient(145deg, rgba(8, 17, 32, .92), rgba(15, 27, 51, .88));
    border-color: rgba(56, 189, 248, .18);
}

body.dark-mode .ability-card.can {
    background: linear-gradient(145deg, rgba(6, 78, 59, .78), rgba(15, 73, 55, .70));
    border-color: rgba(74, 222, 128, .25);
}

body.dark-mode .ability-card.cannot {
    background: linear-gradient(145deg, rgba(93, 25, 36, .76), rgba(67, 20, 48, .70));
    border-color: rgba(251, 113, 133, .25);
}

body.dark-mode .check-card {
    background: linear-gradient(135deg, rgba(8, 27, 51, .92), rgba(15, 37, 87, .88));
    border-color: rgba(56, 189, 248, .28);
}

body.dark-mode .check-kicker { color: #38bdf8; }
body.dark-mode .answer-option {
    background: rgba(8, 17, 32, .80);
    border-color: rgba(56, 189, 248, .20);
    color: #e0f2fe;
}
body.dark-mode .answer-option:hover {
    border-color: #38bdf8;
    background: rgba(8, 145, 178, .20);
}

body.dark-mode .check-answer {
    color: #bbf7d0;
    background: rgba(6, 78, 59, .72);
    border-color: rgba(74, 222, 128, .28);
}

body.dark-mode .next-card-title {
    color: #7dd3fc;
    background: linear-gradient(135deg, rgba(8, 145, 178, .18), rgba(37, 99, 235, .18));
    border-color: rgba(56, 189, 248, .25);
}

body.dark-mode .source-box {
    background: rgba(8, 145, 178, .15);
    border-color: rgba(56, 189, 248, .28);
    color: #e0f2fe;
}
body.dark-mode .source-box b { color: #38bdf8; }
body.dark-mode .source-box a { color: #7dd3fc; }

body.dark-mode .flow-list div {
    background: linear-gradient(135deg, rgba(8, 27, 51, .88), rgba(15, 37, 87, .84));
    border-color: rgba(56, 189, 248, .25);
    color: #e0f2fe;
}
body.dark-mode .flow-list div b,
body.dark-mode .flow-list div strong { color: #fff; }

body.dark-mode .file-card,
body.dark-mode .route-card {
    background: linear-gradient(145deg, rgba(8, 27, 51, .88), rgba(15, 37, 87, .82));
    border-color: rgba(56, 189, 248, .25);
}
body.dark-mode .file-card ion-icon,
body.dark-mode .route-card ion-icon { color: #38bdf8; }
body.dark-mode .file-card strong,
body.dark-mode .route-card strong { color: #fff; }
body.dark-mode .file-card span,
body.dark-mode .route-card span { color: rgba(224, 242, 254, .85); }

/* Responsive adjustments */
@media (max-width: 390px) {
    .hero-mission-row { align-items: stretch; flex-direction: column; }
    .mission-start { width: 100%; }
    .lab-head { align-items: flex-start; flex-direction: column; }
    .lab-flow { grid-template-columns: minmax(0, 1fr) 13px minmax(0, 1fr) 13px minmax(0, 1fr); gap: 2px; }
    .lab-node,
    .lab-core,
    .lab-brain { min-height: 105px; padding: 8px 4px; }
    .lab-node strong,
    .lab-core strong,
    .lab-brain strong { font-size: 11px; }
    .lab-node small,
    .lab-core small,
    .lab-brain small { font-size: 8px; }
    .lab-arrow { font-size: 16px; }
    .completion-actions { align-items: stretch; flex-direction: column; }
    .completion-cta { width: 100%; }
    .definition-grid,
    .ability-grid,
    .comparison-grid { grid-template-columns: 1fr; }
}
