/* MR. INSTA - WOW FACTOR DESIGN
   v5.3 - Refactored & Optimized
   Soft gradients, 3D floating elements, playful aesthetic */

   :root {
    /* Soft Color Palette */
    --primary: #6366F1;
    --primary-light: #818CF8;
    --primary-dark: #4F46E5;
    --accent: #06B6D4;
    --purple: #A855F7;
    --pink: #EC4899;
    --green: #10B981;
    --yellow: #F59E0B;
    
    /* Neutrals */
    --white: #FFFFFF;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-blue: linear-gradient(135deg, #667eea 0%, #06b6d4 100%);
    --gradient-purple: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
    --gradient-soft: linear-gradient(180deg, #faf5ff 0%, #f3e8ff 100%);
    
    /* Shadows - Soft & Layered */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.10);
    --shadow-float: 0 20px 60px rgba(102, 126, 234, 0.25);
    
    /* Spacing */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-3xl: 32px;
    --radius-full: 9999px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Sora', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--gray-900);
    background: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* =========================================
   BACKGROUND & SHAPES
   ========================================= */
.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(180deg, #faf5ff 0%, #f3e8ff 40%, #ffffff 100%);
    z-index: -2;
}

.floating-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.5;
    animation: float 25s infinite ease-in-out;
}

.shape-1 {
    top: 10%;
    left: 10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(167, 139, 250, 0.3), transparent);
    animation-delay: 0s;
}

.shape-2 {
    top: 50%;
    right: 5%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.25), transparent);
    animation-delay: -12s;
}

.shape-3 {
    bottom: 10%;
    left: 40%;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.2), transparent);
    animation-delay: -6s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
}

/* =========================================
   NAVIGATION
   ========================================= */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
}

.logo img {
    height: 36px;
    width: auto;
    display: block;
}

/* NEW: Beta Badge */
.beta-badge {
    background: var(--gray-100);
    color: var(--gray-600);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--gray-200);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--gray-600);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--primary);
}

.btn-nav {
    padding: 0.625rem 1.5rem;
    background: var(--gray-900);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-nav:hover {
    background: var(--gray-700);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .logo img { height: 32px; }
    .beta-badge { display: none; }
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero {
    padding: 6rem 2rem 8rem;
    text-align: center;
    position: relative;
}

.hero-container {
    max-width: 900px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--green);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--green);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.hero-title {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    font-size: 1.25rem;
    color: var(--gray-600);
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 4rem;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 1rem 2rem;
    background: var(--gray-900);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-lg);
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 1rem 2rem;
    background: white;
    color: var(--gray-900);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Trust Box */
.trust-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-200);
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-500);
    font-weight: 600;
}

.trust-item svg {
    color: var(--green);
}

/* NEW: Clean Status Pill (Streak) */
.streak-pill-container {
    margin-bottom: 2rem;
    animation: fadeIn 0.5s ease-out;
}

.streak-pill {
    display: inline-flex;
    align-items: center;
    background: white;
    padding: 0.5rem 0.5rem 0.5rem 1rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-md);
    transition: transform 0.2s;
}

.streak-pill:hover {
    transform: translateY(-2px);
    border-color: var(--primary-light);
}

.streak-icon {
    font-size: 1.2rem;
    margin-right: 0.75rem;
}

.streak-text {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-right: 1rem;
}

.streak-link {
    background: var(--gray-100);
    color: var(--gray-700);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-full);
    text-decoration: none;
    transition: all 0.2s;
}

.streak-link:hover {
    background: var(--primary);
    color: white;
}

/* Floating Cards (Hero) */
.floating-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.card {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-float);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.card:hover { transform: translateY(-8px) rotate(2deg); }
.card-1 { animation: float-1 6s infinite ease-in-out; }
.card-2 { animation: float-2 6s infinite ease-in-out; animation-delay: -2s; }
.card-3 { animation: float-3 6s infinite ease-in-out; animation-delay: -4s; }

@keyframes float-1 { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-12px) rotate(2deg); } }
@keyframes float-2 { 0%, 100% { transform: translateY(0) rotate(2deg); } 50% { transform: translateY(-16px) rotate(-2deg); } }
@keyframes float-3 { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-14px) rotate(1deg); } }

.card-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.card-title { font-size: 0.875rem; font-weight: 600; color: var(--gray-500); margin-bottom: 0.5rem; }
.card-stat { font-size: 1.75rem; font-weight: 800; background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

@media (max-width: 768px) {
    .floating-cards { grid-template-columns: 1fr; }
}

/* =========================================
   ALGORITHM LOG (New Design)
   ========================================= */
.algo-section { 
    padding: 4rem 0; 
    background: #F8FAFC; 
    border-bottom: 1px solid #E2E8F0; 
}

/* UPDATED: 2-Column Grid on Desktop to fix "orphan" card issue */
.algo-grid { 
    display: grid; 
    grid-template-columns: 1fr; 
    gap: 1.5rem; 
    margin-top: 2rem; 
}

@media (min-width: 768px) {
    .algo-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.algo-card { 
    background: white; 
    padding: 1.5rem; 
    border-radius: 12px; 
    border: 1px solid #E2E8F0; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.05); 
    position: relative; 
}

.algo-card.high-impact { border-left: 4px solid #EF4444; }
.algo-card.med-impact { border-left: 4px solid #F59E0B; }

.algo-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; }
.algo-date { font-size: 0.75rem; font-weight: 700; color: #64748B; text-transform: uppercase; }

.algo-status { padding: 0.25rem 0.5rem; border-radius: 4px; font-size: 0.7rem; font-weight: 800; text-transform: uppercase; }
.status-confirmed { background: #DCFCE7; color: #166534; }
.status-update { background: #DBEAFE; color: #1E40AF; }
.status-live { background: #FEE2E2; color: #991B1B; } 

.algo-title { font-size: 1.125rem; font-weight: 800; color: #1E293B; margin-bottom: 0.5rem; }
.algo-desc { font-size: 0.9375rem; color: #475569; line-height: 1.5; margin-bottom: 1.5rem; }

.algo-source { 
    font-size: 0.75rem; 
    color: #6366F1; 
    text-decoration: none; 
    position: absolute; 
    bottom: 0.75rem; 
    right: 1rem; 
    font-weight: 600; 
}
.algo-source:hover { text-decoration: underline; }

/* =========================================
   30-DAY COACH / CHALLENGE SECTION
   ========================================= */
.coach-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, #FFF 0%, #F3F4F6 100%);
    border-top: 1px solid var(--gray-200);
}

.coach-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

/* Challenge Grid Interface */
.challenge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.day-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    opacity: 0.7;
}

.day-card.active-day {
    opacity: 1;
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
    background: white;
}

.day-card.completed {
    background: #ECFDF5;
    border-color: var(--green);
    opacity: 1;
}

.day-card.locked {
    background: var(--gray-50);
    cursor: not-allowed;
    opacity: 0.5;
}

.day-number {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--gray-500);
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

.day-status-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--gray-400);
}

.active-day .day-status-icon { color: var(--primary); }
.completed .day-status-icon { color: var(--green); }

.day-label {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--gray-800);
    line-height: 1.2;
}

/* Active Task View */
.challenge-active-view {
    margin-top: 2rem;
    background: white;
    border: 2px solid var(--primary);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    text-align: left;
    box-shadow: var(--shadow-xl);
    position: relative;
    animation: fadeIn 0.4s ease-out;
}

/* Waiting View (Task Done for Day) */
.challenge-waiting-view {
    margin-top: 2rem;
    background: #ECFDF5;
    border: 2px solid #10B981;
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    position: relative;
    animation: fadeIn 0.4s ease-out;
}

.challenge-header-badge {
    position: absolute;
    top: -12px;
    left: 2rem;
    background: var(--primary);
    color: white;
    padding: 0.25rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.challenge-waiting-view .challenge-header-badge {
    background: #10B981;
    left: 50%;
    transform: translateX(-50%);
}

.challenge-task-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

.challenge-task-desc {
    font-size: 1.125rem;
    color: var(--gray-700);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.challenge-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-complete {
    background: var(--green);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    cursor: pointer;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.2s;
}

.btn-complete:hover {
    transform: scale(1.05);
    background: #059669;
}

/* Calendar Button (New Addition) */
.btn-calendar {
    background: white;
    color: var(--gray-900);
    border: 2px solid var(--gray-200);
    padding: 1rem 2rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    cursor: pointer;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.btn-calendar:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.reset-link {
    display: block;
    text-align: center;
    margin-top: 2rem;
    font-size: 0.875rem;
    color: var(--gray-400);
    text-decoration: underline;
    cursor: pointer;
}

/* Loader */
.spinner-box { text-align: center; padding: 3rem; }
.pulse-ring { width: 50px; height: 50px; border: 4px solid var(--gray-200); border-top-color: var(--primary); border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto; }
@keyframes spin { 100% { transform: rotate(360deg); } }

/* =========================================
   COMPARISON / WHY SECTION
   ========================================= */
.why-section { padding: 6rem 0; }

.comparison-table-wrapper {
    overflow-x: auto;
    margin-top: 3rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    text-align: left;
    min-width: 600px;
}

.comparison-table th, 
.comparison-table td {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-100);
}

.comparison-table th {
    background: var(--gray-50);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-600);
}

.comparison-table th.bad-col { background: #FEF2F2; color: #DC2626; border-bottom: 2px solid #DC2626; }
.comparison-table th.good-col { background: #F0FDF4; color: #16A34A; border-bottom: 2px solid #16A34A; }
.comparison-table td { color: var(--gray-700); font-size: 1rem; }
.danger-text { color: #DC2626; font-weight: 700; }
.success-text { color: #16A34A; font-weight: 700; }

/* =========================================
   VISUALIZER SECTION
   ========================================= */
.visualizer-section {
    padding: 6rem 0;
    background: linear-gradient(180deg, #ffffff 0%, #faf5ff 100%);
}

.visualizer {
    background: white;
    border-radius: var(--radius-3xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    border: 1px solid var(--gray-100);
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 0;
}

.viz-controls {
    padding: 3rem;
    background: var(--gray-50);
    border-right: 1px solid var(--gray-200);
}

.control { margin-bottom: 2rem; }
.control label { display: block; font-size: 0.875rem; font-weight: 700; margin-bottom: 0.75rem; color: var(--gray-700); }

.select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--gray-900);
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}
.select:focus { outline: none; border-color: var(--primary); }

.slider-group { display: flex; flex-direction: column; gap: 0.5rem; }
.slider { width: 100%; height: 6px; border-radius: 3px; background: var(--gray-200); outline: none; -webkit-appearance: none; }
.slider::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--gradient-primary); cursor: pointer; box-shadow: var(--shadow-md); transition: all 0.2s; }
.slider::-webkit-slider-thumb:hover { transform: scale(1.2); }
.slider-value { font-size: 0.875rem; font-weight: 700; color: var(--primary); }

.viz-results { padding: 3rem; }

.chart-wrapper {
    background: var(--gray-50);
    border-radius: var(--radius-xl);
    padding: 2rem;
    margin-bottom: 2rem;
    position: relative;
    background-image: 
        linear-gradient(rgba(226, 232, 240, 0.5) 1px, transparent 1px),
        linear-gradient(90deg, rgba(226, 232, 240, 0.5) 1px, transparent 1px);
    background-size: 40px 40px;
}

canvas#chart { width: 100% !important; height: auto !important; display: block; min-height: 300px; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-bottom: 2rem; }
.stat { text-align: center; padding: 1.5rem; background: var(--gray-50); border-radius: var(--radius-lg); }
.stat-value { font-size: 2rem; font-weight: 800; color: var(--gray-900); margin-bottom: 0.5rem; }
.stat-label { font-size: 0.8125rem; font-weight: 700; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.05em; }

.insight { display: flex; gap: 1rem; padding: 1.5rem; background: linear-gradient(135deg, #DBEAFE 0%, #BFDBFE 100%); border-radius: var(--radius-lg); border: 2px solid var(--accent); }
.insight svg { flex-shrink: 0; color: var(--accent); }
.insight p { font-weight: 600; color: var(--gray-800); line-height: 1.6; }
.chart-disclaimer { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--gray-200); font-size: 0.75rem; color: var(--gray-400); text-align: center; }

@media (max-width: 1024px) {
    .visualizer { grid-template-columns: 1fr; }
    .viz-controls { border-right: none; border-bottom: 1px solid var(--gray-200); }
}
@media (max-width: 768px) {
    .stats { grid-template-columns: 1fr; }
}

/* =========================================
   SEO GUIDE & CONTENT
   ========================================= */
.seo-guide-section { padding: 6rem 0; background: #fff; }

.seo-article { max-width: 740px; margin: 0 auto; font-size: 1.125rem; line-height: 1.8; color: var(--gray-700); }
.seo-article h1 { font-size: 2.5rem; font-weight: 800; margin-bottom: 1.5rem; color: var(--gray-900); line-height: 1.1; }
.seo-article h2 { font-size: 2rem; font-weight: 800; color: var(--gray-900); margin-top: 3rem; margin-bottom: 1.5rem; letter-spacing: -0.02em; }
.seo-article h3 { font-size: 1.5rem; font-weight: 700; color: var(--gray-800); margin-top: 2.5rem; margin-bottom: 1rem; border-bottom: 2px solid var(--gray-100); padding-bottom: 0.5rem; }
.seo-article p { margin-bottom: 1.5rem; }
.seo-article ul { margin-bottom: 2rem; padding-left: 1.5rem; }
.seo-article li { margin-bottom: 0.75rem; }
.seo-highlight { background: #FEF3C7; padding: 0.1rem 0.3rem; border-radius: 4px; font-weight: 700; color: var(--gray-900); }

/* Daily Insight Box */
.daily-insight-box {
    background: #F0FDF4; 
    border: 1px solid #BBF7D0;
    border-left: 4px solid #16A34A;
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    box-shadow: var(--shadow-sm);
}
.daily-insight-box::before {
    content: "⚡ FRESH STRATEGY";
    position: absolute;
    top: -10px;
    right: 2rem;
    background: #16A34A;
    color: white;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    letter-spacing: 0.05em;
}
/* MODIFIER: Hides the badge for Contact/Legal pages */
.daily-insight-box.no-badge::before {
    display: none;
}

.insight-label { color: #166534; font-weight: 800; font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.75rem; }
.daily-insight-box h3 { color: #14532D; font-size: 1.5rem; font-weight: 800; margin-bottom: 1rem; margin-top: 0; border: none; }
.daily-insight-box p { color: #15803D; font-size: 1.0625rem; line-height: 1.7; margin-bottom: 0; }

/* Pro Tip Box */
.pro-tip-box {
    background: linear-gradient(135deg, #4F46E5 0%, #6366F1 100%);
    color: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    margin: 2rem 0;
    box-shadow: var(--shadow-lg);
}
.pro-tip-box h4 { color: white; margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.5rem; }
.pro-tip-box p { color: rgba(255, 255, 255, 0.9); margin-bottom: 0; }

/* Table of Contents */
.toc-box {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 3rem;
}
.toc-title { font-size: 1rem; font-weight: 800; color: var(--gray-900); margin-bottom: 1rem; text-transform: uppercase; letter-spacing: 0.05em; }
.toc-list { list-style: none; padding: 0 !important; margin: 0 !important; }
.toc-list li { margin-bottom: 0.75rem; padding-left: 0 !important; }
.toc-list a { text-decoration: none; color: var(--primary); font-weight: 600; font-size: 1rem; }
.toc-list a:hover { text-decoration: underline; }

/* Strategy Archive */
.strategy-archive-section { padding: 6rem 0; background: white; border-top: 1px solid var(--gray-100); }
.strategy-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; margin-top: 3rem; }

#hidden-strategy-grid.active { display: grid !important; animation: fadeIn 0.5s ease-out; }

.strategy-card {
    display: block; 
    text-decoration: none; 
    color: inherit; 
    background: #F8FAFC;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: all 0.3s;
}
.strategy-card:hover { border-color: var(--primary); background: white; box-shadow: var(--shadow-md); transform: translateY(-2px); }
.strategy-card h4 { color: var(--primary); font-size: 1.125rem; font-weight: 800; margin-bottom: 1rem; }
.strategy-card p { font-size: 0.9375rem; color: var(--gray-600); margin-bottom: 0.75rem; line-height: 1.6; }
.strategy-card strong { color: var(--gray-900); }

/* Master Guide Accordion */
.master-guide-section { margin-top: 4rem; padding-top: 4rem; border-top: 1px solid var(--gray-200); }
.master-guide-title { font-size: 1.75rem; font-weight: 800; color: var(--gray-900); margin-bottom: 2rem; text-align: center; }
.guide-accordion { display: flex; flex-direction: column; gap: 1rem; }

.guide-item {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s ease;
    scroll-margin-top: 120px;
}
.guide-item:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.guide-item[open] { border-color: var(--primary); background: #F8FAFC; }
.guide-item summary { padding: 1.5rem; cursor: pointer; font-weight: 700; font-size: 1.125rem; color: var(--gray-800); list-style: none; display: flex; justify-content: space-between; align-items: center; }
.guide-item summary::-webkit-details-marker { display: none; }
.guide-item summary::after { content: '+'; font-size: 1.5rem; color: var(--primary); font-weight: 400; }
.guide-item[open] summary::after { content: '-'; }
.guide-content { padding: 0 1.5rem 1.5rem; color: var(--gray-700); line-height: 1.7; border-top: 1px solid rgba(0,0,0,0.05); margin-top: -0.5rem; padding-top: 1.5rem; }
.guide-tag { display: inline-block; font-size: 0.75rem; background: var(--gray-100); padding: 0.25rem 0.5rem; border-radius: 4px; margin-bottom: 1rem; color: var(--gray-500); font-weight: 600; text-transform: uppercase; }

/* =========================================
   GLOSSARY & FAQ
   ========================================= */
.glossary-section { padding: 6rem 0; background: var(--gray-50); border-top: 1px solid var(--gray-200); }
.glossary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; margin-top: 3rem; }
.glossary-item { background: white; padding: 2rem; border-radius: var(--radius-lg); border: 1px solid var(--gray-200); transition: all 0.3s; }
.glossary-item:hover { border-color: var(--primary); transform: translateY(-4px); box-shadow: var(--shadow-md); }
.glossary-item h4 { font-size: 1.125rem; font-weight: 800; margin-bottom: 0.75rem; color: var(--gray-900); }
.glossary-item p { font-size: 0.9375rem; color: var(--gray-600); line-height: 1.6; }

.faq-section { padding: 6rem 0; background: var(--gray-50); }
.faq { display: flex; flex-direction: column; gap: 1rem; }
.faq-item { background: white; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); overflow: hidden; }
.faq-item summary { padding: 1.5rem; font-weight: 700; cursor: pointer; list-style: none; transition: background 0.2s; }
.faq-item summary:hover { background: var(--gray-50); }
.faq-item p { padding: 0 1.5rem 1.5rem; color: var(--gray-600); line-height: 1.7; }

/* =========================================
   CTA & FOOTER
   ========================================= */
.cta-section { padding: 6rem 0; }

.cta-card {
    background: var(--gradient-primary);
    padding: 4rem;
    border-radius: var(--radius-3xl);
    text-align: center;
    color: white;
    box-shadow: var(--shadow-float);
}
.cta-card h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 1rem; }
.cta-card > p { font-size: 1.125rem; opacity: 0.9; margin-bottom: 2rem; }

.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.125rem 2.5rem;
    background: white;
    color: var(--primary);
    border: none;
    border-radius: var(--radius-lg);
    font-weight: 800;
    font-size: 1.0625rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: var(--shadow-lg);
}
.btn-cta:hover { transform: translateY(-2px); box-shadow: var(--shadow-xl); }

.footer { background: var(--gray-900); color: white; padding: 3rem 0 2rem; }
.footer-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 2rem; padding-bottom: 2rem; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.footer-logo { font-size: 1.5rem; font-weight: 800; margin-bottom: 0.75rem; }
.footer-brand p { opacity: 0.7; }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.75rem; justify-content: flex-end; }
.footer-links a { color: white; text-decoration: none; opacity: 0.8; transition: opacity 0.2s; white-space: nowrap; }
.footer-links a:hover { opacity: 1; }
.footer-bottom { text-align: center; font-size: 0.875rem; opacity: 0.6; }
.footer-bottom p { margin-bottom: 0.5rem; }

@media (max-width: 768px) {
    .footer-top { flex-direction: column; gap: 2rem; }
}

/* =========================================
   UI COMPONENTS (Modals, Utils, Effects)
   ========================================= */
.ui-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.ui-modal-overlay.active { opacity: 1; visibility: visible; }

.ui-modal {
    background: white;
    width: 90%;
    max-width: 400px;
    border-radius: var(--radius-2xl);
    padding: 2rem;
    box-shadow: var(--shadow-2xl);
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: center;
}
.ui-modal-overlay.active .ui-modal { transform: translateY(0); }

.ui-modal-icon { width: 60px; height: 60px; background: var(--gray-100); color: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 1.5rem; font-size: 1.75rem; }
.ui-modal-title { font-size: 1.25rem; font-weight: 800; color: var(--gray-900); margin-bottom: 0.75rem; }
.ui-modal-message { color: var(--gray-600); margin-bottom: 2rem; line-height: 1.5; }

.ui-modal-btn {
    width: 100%;
    padding: 0.875rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}
.ui-modal-btn:hover { background: var(--primary-dark); }

.scroll-top-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: white;
    color: var(--gray-900);
    border: 1px solid var(--gray-200);
    border-radius: 50%;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 90;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    pointer-events: none;
}
.scroll-top-btn.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.scroll-top-btn:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-4px); }

/* Confetti Effect */
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    z-index: 9999;
    pointer-events: none;
}

/* Container Spacing Utilities */
.container, .container-narrow, .container-wide { margin: 0 auto; padding: 0 2rem; }
.container { max-width: 1080px; }
.container-narrow { max-width: 720px; }
.container-wide { max-width: 1280px; }

.section-header { text-align: center; margin-bottom: 4rem; }
.section-header h2 { font-size: clamp(2.5rem, 5vw, 3.5rem); font-weight: 800; margin-bottom: 1rem; letter-spacing: -0.03em; line-height: 1.1; }
.section-header p { font-size: 1.125rem; color: var(--gray-600); }

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    font-size: 0.8125rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: var(--radius-full);
    margin-bottom: 1rem;
}

/* Animations */
.fade-in { animation: fadeIn 0.5s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* =========================================
   CONVERSION OPTIMIZATIONS (v1.0)
   ========================================= */

/* The "Money Button" Pulse - Increases CTR */
.btn-pulse {
    position: relative;
    overflow: hidden;
    animation: gentle-pulse 3s infinite;
}

.btn-pulse::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: var(--radius-lg);
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7);
    animation: ripple 3s infinite;
    z-index: -1;
}

@keyframes gentle-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

@keyframes ripple {
    0% { transform: scale(0.95); opacity: 0.7; }
    70% { transform: scale(1.15); opacity: 0; }
    100% { transform: scale(0.95); opacity: 0; }
}

/* Mobile Sticky CTA Adjustments */
@media (max-width: 768px) {
    .btn-pulse {
        width: 100%; /* Full width on mobile for easier tapping */
        justify-content: center;
    }
}