:root {
    --font-main: 'Inter', sans-serif;
    --font-serif: 'Merriweather', serif;
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --blog-max-width: 800px;
    --sidebar-width: 320px;
    
    /* Shared Colors */
    --accent-primary: #2563eb;
    --accent-secondary: #0ea5e9;
    --accent-gradient: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
}

.light-theme {
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --bg-card-hover: #ffffff;
    --glass-border: rgba(0, 0, 0, 0.08);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --navbar-bg: rgba(255, 255, 255, 0.8);
    --footer-bg: rgba(10, 10, 15, 0.95);
    --symbol-opacity: 0.04;
}

.dark-theme {
    --bg-main: #0f172a;
    --bg-card: #1e293b;
    --bg-card-hover: #334155;
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --navbar-bg: rgba(15, 23, 42, 0.8);
    --footer-bg: #020617;
    --symbol-opacity: 0.06;
}

/* Background Symbols (Journal/Report Watermark) */
.bg-symbols-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background-color: var(--bg-main);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2rem 0;
    opacity: var(--symbol-opacity);
    transform: rotate(-15deg) scale(1.5);
}

.bg-line {
    font-size: 2.5rem;
    font-weight: 800;
    color: #475569; /* Slate 600 */
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5em;
    user-select: none;
    margin-bottom: 2rem;
    opacity: 0.8;
}

.bg-line:nth-child(even) {
    color: #94a3b8; /* Slate 400 */
    margin-left: -5rem; /* Stagger effect */
}

@keyframes scroll-left {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}


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

body {
    font-family: var(--font-main);
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 { font-size: 3.5rem; line-height: 1.1; }
h2 { font-size: 2.5rem; line-height: 1.2; }
h3 { font-size: 1.75rem; line-height: 1.3; }
h4 { font-size: 1.25rem; line-height: 1.4; }

/* Hero Component Styles */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(37, 99, 235, 0.1);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    border: 1px solid rgba(37, 99, 235, 0.2);
    margin-bottom: 2rem;
    color: var(--accent-primary);
    font-size: 0.875rem;
    font-weight: 500;
}

.hero-title {
    margin-bottom: 1.5rem;
    font-size: 3.5rem;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    line-height: 1.6;
    max-width: 600px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.how-it-works-glass {
    width: 100%;
    max-width: 550px;
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(12px);
}

.how-it-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}

.how-it-header i {
    color: var(--accent-primary);
    width: 24px;
    height: 24px;
}

.how-it-header h4 {
    margin: 0;
    font-size: 1.25rem;
}

.how-it-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.how-it-item {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}

.how-it-icon {
    width: 48px;
    height: 48px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--accent-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition);
}

.how-it-item:hover .how-it-icon {
    background: var(--accent-primary);
    color: white;
    transform: translateY(-3px);
}

.how-it-text strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.how-it-text p {
    font-size: 0.95rem;
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.5;
}

.how-it-footer {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.how-it-footer i {
    color: var(--success);
    width: 18px;
    height: 18px;
}

/* Mobile Typography Overrides (Internal) */
@media (max-width: 768px) {
    h1 { font-size: 2.25rem !important; }
    h2 { font-size: 1.75rem !important; }
    h3 { font-size: 1.5rem !important; }
    h4 { font-size: 1.2rem !important; }
    body { font-size: 16px !important; } /* Force 16px base on mobile */
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-secondary);
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.25rem;
    }
}

/* Hero Section Layout */
.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content {
    animation: slideInLeft 0.8s ease-out;
}

.hero-visual {
    animation: fadeIn 1s ease-out 0.2s both;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }
    .hero-content {
        text-align: center !important;
    }
    .hero-visual {
        order: -1;
        margin-bottom: 2rem;
    }
    .hero-content h1 {
        font-size: 2.8rem !important;
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-main);
}

.menu-toggle {
    display: none;
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--accent-primary);
    padding: 0.5rem;
    font-size: 1.5rem;
    transition: var(--transition);
}

.menu-toggle:hover {
    background: rgba(37, 99, 235, 0.2);
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}

.btn-outline:hover {
    border-color: var(--accent-primary);
    background: rgba(59, 130, 246, 0.1);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--navbar-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 0;
}

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

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-brand i {
    color: var(--accent-primary);
    -webkit-text-fill-color: initial;
}

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

.mobile-nav-cta {
    display: none;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: var(--transition);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
}

/* Main Content area */
#app-content {
    flex: 1;
    margin-top: 80px; /* Space for navbar */
    min-height: calc(100vh - 80px - 200px);
}

/* Views */
.view {
    display: none;
    animation: fadeIn 0.5s ease-out;
}

.view.active {
    display: block;
}

/* Footer */
.footer {
    background: var(--footer-bg);
    border-top: 1px solid var(--glass-border);
    padding: 4rem 0 2rem;
    margin-top: auto;
    color: rgba(255, 255, 255, 0.9); /* Force light text for dark footer */
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
}

.footer-col h4 {
    margin-bottom: 1.5rem;
    color: #ffffff;
}

.footer-col .nav-link {
    display: block;
    margin-bottom: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
}

.footer-col .nav-link:hover {
    color: white;
    transform: translateX(5px);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
}

.footer-bottom {
    max-width: 1200px;
    margin: 2rem auto 0;
    padding: 2rem 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
}

.disclaimer-text {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
}

/* Utility Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Glass Card */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: var(--transition);
}

.glass-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(0, 0, 0, 0.15);
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-main);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: var(--bg-card);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

textarea.form-input {
    min-height: 120px;
    resize: vertical;
}

/* Text Gradients */
.text-gradient {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}


/* ─── INSTITUTIONAL DASHBOARD ─── */
.report-container { padding: 0.5rem 0 2rem; animation: fadeIn 0.4s ease-out; }

.report-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    margin-bottom: 2rem; padding: 2rem;
    background: rgba(37,99,235,0.05); border: 1px solid rgba(37,99,235,0.15);
    border-radius: var(--radius-lg); position: relative; overflow: hidden;
}
.report-header::before {
    content:''; position: absolute; top:0; left:0; width:4px; height:100%; background: var(--accent-primary);
}
.report-badge {
    font-size: 0.7rem; font-weight: 700; letter-spacing: 0.15em;
    text-transform: uppercase; color: var(--accent-secondary); margin-bottom: 0.5rem;
}
.report-title { font-size: 1.85rem; font-weight: 700; margin-bottom: 0.4rem; color: var(--text-primary); }
.report-period { color: var(--text-muted); font-size: 0.9rem; }
.report-score-badge {
    text-align: center; border: 1px solid var(--glass-border);
    background: var(--bg-card); border-radius: var(--radius-md); 
    padding: 1.25rem 2rem; min-width: 120px; box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.kpi-grid {
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.25rem; 
    margin-bottom: 2rem;
}

.kpi-card {
    background: var(--bg-card); 
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md); 
    padding: 1.5rem; 
    transition: var(--transition);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column;
}

@media (max-width: 768px) {
    .kpi-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }
    .kpi-card {
        padding: 1rem;
    }
    .kpi-value {
        font-size: 1.5rem !important;
    }
}

@media (max-width: 480px) {
    .kpi-grid {
        grid-template-columns: 1fr;
    }
}
.kpi-icon { color: var(--accent-primary); margin-bottom: 0.75rem; }
.kpi-icon i { width: 22px; height: 22px; }
.kpi-label { font-size: 0.8rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.4rem; }
.kpi-value { font-size: 1.6rem; font-weight: 700; line-height: 1.1; margin-bottom: 0.4rem; color: var(--text-primary); }
.kpi-sub { font-size: 0.8rem; color: var(--text-muted); }

.section-header {
    display: flex; align-items: center; gap: 0.6rem;
    margin-bottom: 1.25rem; padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.section-header i { width: 20px; height: 20px; color: var(--accent-primary); flex-shrink: 0; }
.section-header h3 { font-size: 1.1rem; font-weight: 600; letter-spacing: -0.01em; margin: 0; color: var(--text-primary); }

.stat-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.55rem 0; border-bottom: 1px dashed rgba(0,0,0,0.05); font-size: 0.9rem;
}
.stat-row:last-child { border-bottom: none; }
.stat-label { color: var(--text-secondary); }
.stat-val { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text-primary); }

.stats-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 1.5rem; }
.charts-3col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1.5rem; margin-bottom: 1.5rem; }
.charts-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 1.5rem; }
.chart-card { padding: 1.5rem; }
.chart-card-full { padding: 1.5rem; margin-bottom: 1.5rem; }

/* Heatmap Grid */
.heatmap-wrapper { overflow-x: auto; padding-bottom: 1rem; margin-top: 0.5rem; }
.heatmap-table { width: 100%; border-collapse: separate; border-spacing: 4px; font-size: 0.85rem; }
.heatmap-table th { color: var(--text-muted); font-weight: 600; padding: 0.5rem; text-align: center; font-size: 0.75rem; text-transform: uppercase; }
.hm-cell { padding: 0.75rem 0.5rem; text-align: center; border-radius: 4px; font-weight: 600; font-variant-numeric: tabular-nums; min-width: 50px; border: 1px solid rgba(0,0,0,0.02); }
.hm-cell.empty { background: var(--bg-main); border: none; }
.hm-year { font-weight: 700; color: var(--text-primary); padding-right: 1.5rem; text-align: left; }
.hm-ytd { font-weight: 700; text-align: center; background: var(--bg-main); border-radius: 4px; border: 1px solid var(--glass-border); }

.monthly-scroll { max-height: 250px; overflow-y: auto; }
.monthly-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.monthly-table th { color: var(--text-muted); font-weight: 500; padding: 0.4rem 0.6rem; text-align: left; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
.monthly-table td { padding: 0.4rem 0.6rem; border-top: 1px solid rgba(0,0,0,0.04); }

.insights-list { display: flex; flex-direction: column; gap: 0.85rem; }
.insight-item { display: flex; gap: 0.85rem; font-size: 0.95rem; color: var(--text-secondary); line-height: 1.6; padding: 1rem; background: var(--bg-main); border-radius: var(--radius-md); border: 1px solid var(--glass-border); }

/* Loader Overlay */
.loader-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: var(--navbar-bg); z-index: 9999;
    display: flex; justify-content: center; align-items: center;
    backdrop-filter: blur(8px); transition: opacity 0.5s;
}
.loader-content { text-align: center; }
.spinner {
    width: 60px; height: 60px; border: 4px solid rgba(37, 99, 235, 0.1);
    border-top-color: var(--accent-primary); border-radius: 50%;
    animation: spin 1s linear infinite; margin: 0 auto 1.5rem;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader-content h3 { color: var(--text-primary); font-size: 1.5rem; margin-bottom: 0.5rem; }
.loader-content p { color: var(--text-secondary); font-size: 1rem; }

.disclaimer-block {
    display: flex; gap: 1rem; align-items: flex-start;
    padding: 1.25rem; background: rgba(245,158,11,0.05); border: 1px solid rgba(245,158,11,0.15);
    border-radius: var(--radius-md); margin-top: 2rem;
    font-size: 0.85rem; color: var(--text-muted); line-height: 1.5;
}
.disclaimer-block i { color: var(--warning); flex-shrink: 0; width: 22px; height: 22px; }

.report-actions { display: flex; gap: 1rem; justify-content: center; padding: 2rem 0; flex-wrap: wrap; }

@media (max-width: 900px) {
    .stats-2col, .charts-2col, .charts-3col { grid-template-columns: 1fr; }
    .kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .report-header { flex-direction: column; gap: 1.5rem; }
    .report-score-badge { align-self: flex-start; }
}
@media (max-width: 480px) {
    .kpi-grid { grid-template-columns: 1fr; }
}

/* Report Navigation & Sections */
.report-nav-wrapper {
    position: sticky;
    top: 70px;
    z-index: 100;
    margin-bottom: 2rem;
    background: var(--bg-main);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    padding: 0.75rem 0;
}
.report-nav {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    max-width: 1200px;
    margin: 0 auto;
}
.nav-btn {
    padding: 0.6rem 1.4rem;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
}
.nav-btn:hover {
    color: var(--accent-primary);
    background: rgba(37, 99, 235, 0.05);
}
.nav-btn.active {
    color: var(--accent-primary);
    background: var(--bg-card);
    border-color: var(--accent-primary);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.08);
}

.report-section-divider {
    padding-top: 4rem;
    margin-top: 4rem;
    border-top: 1px solid var(--glass-border);
}
.section-title {
    margin-bottom: 2.5rem;
}
.section-title h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.85rem;
}
.section-title h3 i {
    width: 26px;
    height: 26px;
    color: var(--accent-primary);
}

@media print {
    .report-nav-wrapper { display: none; }
    .report-section-divider { page-break-before: always; border-top: none; padding-top: 0; }
}

/* ─── ARTICLES & MARKETPLACE ─── */
/* ─── NEW PROFESSIONAL BLOG DESIGN STYLES ─── */
.article-list-container {
    max-width: 1000px;
    margin: 0 auto;
}

.blog-post-list {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.blog-post-card {
    display: flex;
    gap: 2rem;
    padding: 2.5rem;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    transition: var(--transition);
    cursor: pointer;
    align-items: center;
}

.blog-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    border-color: var(--accent-primary);
}

.blog-post-icon {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 99, 235, 0.05);
    border-radius: 16px;
}

.blog-post-content {
    flex: 1;
}

.blog-post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.blog-post-meta span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.blog-post-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.blog-post-card p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
}

/* --- Blog Detail Layout with Sidebar --- */
.blog-layout {
    display: grid;
    grid-template-columns: 1fr var(--sidebar-width);
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.blog-main {
    max-width: var(--blog-max-width);
}

.blog-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.blog-breadcrumb a {
    color: var(--text-muted);
}

.blog-header {
    margin-bottom: 3rem;
}

.blog-category-label {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(37, 99, 235, 0.1);
    color: var(--accent-primary);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.blog-header h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    color: var(--text-primary);
}

.blog-meta-footer {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 3rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.author-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.author-avatar {
    width: 32px;
    height: 32px;
    background: var(--accent-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.8rem;
}

/* Article Typography (The Serif Focus) */
.article-body {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.article-body h2, .article-body h3 {
    font-family: var(--font-main); /* Keep headings sans-serif for high-contrast */
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.article-body p {
    margin-bottom: 2rem;
}

.article-body dfn {
    font-style: normal;
    font-weight: 700;
    color: var(--text-primary);
    border-bottom: 2px solid var(--accent-primary);
}

/* Sidebar Widgets */
.blog-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.sidebar-widget {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.sidebar-widget h4 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-widget h4 i {
    width: 18px;
    height: 18px;
    color: var(--accent-primary);
}

.widget-content p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.toc-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toc-item {
    font-size: 0.9rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.toc-item:hover {
    color: var(--accent-primary);
    transform: translateX(5px);
}

@media (max-width: 1024px) {
    .blog-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .blog-sidebar {
        order: 2;
    }
    .blog-header h1 {
        font-size: 2.75rem;
    }
}

@media (max-width: 768px) {
    .blog-post-card {
        flex-direction: column;
        text-align: center;
        padding: 2rem;
    }
    .blog-post-icon {
        margin-bottom: 1rem;
    }
    .blog-post-meta {
        justify-content: center;
    }
    .blog-header h1 {
        font-size: 2.25rem;
    }
}

/* ─── TIME ANALYSIS DASHBOARD ─── */
.time-analysis-view {
    padding: 2rem 0 6rem;
    animation: fadeIn 0.5s ease-out;
}

.time-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.time-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.time-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.time-card-header i {
    color: var(--accent-primary);
    width: 24px;
    height: 24px;
}

/* Heatmap Grid */
.heatmap-wrapper {
    margin-top: 1rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.heatmap-table {
    width: 100%;
    min-width: 700px;
    border-collapse: separate;
    border-spacing: 4px;
    font-size: 0.8rem;
    table-layout: auto;
}

.heatmap-table th {
    font-weight: 600;
    color: var(--text-muted);
    padding: 0.5rem 0.25rem;
    text-align: center;
    text-transform: uppercase;
    font-size: 0.7rem;
    white-space: nowrap;
}

.hm-year {
    font-weight: 700;
    color: var(--text-primary);
    text-align: left;
    padding: 8px 12px 8px 4px;
    white-space: nowrap;
}

.hm-cell {
    /* IMPORTANT: do NOT use display:flex on a td — it breaks table layout */
    text-align: center;
    vertical-align: middle;
    padding: 8px 4px;
    border-radius: 5px;
    font-weight: 700;
    font-size: 0.72rem;
    white-space: nowrap;
    cursor: help;
    transition: transform 0.15s, box-shadow 0.15s;
    border: 1px solid rgba(0,0,0,0.03);
    min-width: 52px;
}

.hm-cell:hover {
    transform: scale(1.08);
    z-index: 10;
    position: relative;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}



/* Yearly List Styles (Horizontal) */
.yearly-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

/* Session List Styles */
.session-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.session-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--bg-main);
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
}

.session-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.session-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.session-details h4 {
    font-size: 1rem;
    margin: 0;
}

.session-details span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.session-stats {
    text-align: right;
}

.session-pnl {
    font-weight: 700;
    font-size: 1.1rem;
    display: block;
}

.session-winrate {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Insight Cards */
.insight-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.insight-chip {
    padding: 0.5rem 1rem;
    background: rgba(37, 99, 235, 0.05);
    border: 1px solid rgba(37, 99, 235, 0.15);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.insight-chip i {
    width: 14px;
    height: 14px;
    color: var(--accent-primary);
}

.time-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.time-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.yearly-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

@media (max-width: 1024px) {
    .time-grid { grid-template-columns: 1fr; }
}

/* Mobile Sticky CTA & Bottom Nav */
.mobile-sticky-cta {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem 1.5rem;
    background: var(--navbar-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    z-index: 1000;
    box-shadow: 0 -10px 25px rgba(0,0,0,0.1);
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65px;
    background: var(--navbar-bg);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    z-index: 999;
    padding: 0.5rem 1rem;
}

.bottom-nav-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 500px;
    margin: 0 auto;
    height: 100%;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: var(--transition);
}

.bottom-nav-item i { width: 22px; height: 22px; }
.bottom-nav-item.active { color: var(--accent-primary); }

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* Mobile Responsive Overrides */
@media (max-width: 768px) {
    .navbar { padding: 0.75rem 0; height: 60px; }
    #app-content { margin-top: 60px; padding-bottom: 80px; } /* Space for bottom nav/cta */
    
    .container { padding: 0 1rem; }
    
    .hero-section { padding: 2.5rem 0 3.5rem; }
    .hero-grid { gap: 2.5rem; }
    
    .hero-title { font-size: 2.5rem; margin-bottom: 1.25rem; }
    .hero-subtitle { font-size: 1.1rem; margin-bottom: 2.5rem; }
    
    .hero-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .hero-actions .btn {
        width: 100%;
        padding: 1rem;
    }

    .how-it-works-glass {
        padding: 1.75rem;
    }
    
    .how-it-grid {
        gap: 1.5rem;
    }

    .how-it-icon {
        width: 40px;
        height: 40px;
    }
    
    .btn { padding: 0.85rem 1.75rem; font-size: 1.05rem; } /* Touch friendly */
    
    .nav-links {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--bg-main);
        flex-direction: column;
        padding: 2.5rem 1.5rem;
        gap: 1rem;
        z-index: 1001;
        overflow-y: auto;
        animation: slideInDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    @keyframes slideInDown {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }
    
    .nav-links.active { display: flex; }
    
    .nav-link { 
        font-size: 1.25rem; 
        padding: 1rem 0; 
        border-bottom: 1px solid var(--glass-border); 
        width: 100%;
    }

    /* Mobile Menu CTA */
    .mobile-nav-cta {
        display: flex;
        margin-top: 1rem;
        width: 100%;
        padding: 1rem;
        justify-content: center;
        background: var(--accent-gradient);
        color: white;
        font-weight: 600;
        border-radius: var(--radius-md);
    }
    
    .nav-links::after { display: none; }
    
    .nav-actions {
        display: flex;
        gap: 0.5rem;
    }

    .nav-actions .btn:not(#theme-toggle) { display: none; }
    .menu-toggle { display: flex; align-items: center; justify-content: center; }
    
    /* Dashboard Mobile SaaS */
    .report-container { padding: 0.5rem 0; }
    .kpi-grid { grid-template-columns: 1fr 1fr !important; gap: 0.75rem !important; }
    .kpi-card { padding: 1rem !important; border-width: 1px; }
    .kpi-value { font-size: 1.4rem !important; }
    
    .report-header { 
        padding: 1.5rem 1rem !important; 
        border-radius: var(--radius-md);
        flex-direction: column;
        gap: 1.5rem;
    }
    .report-title { font-size: 1.5rem; }
    
    .report-nav { 
        margin: 0 -1.25rem; 
        padding: 0.5rem 1.25rem; 
        overflow-x: auto;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-btn {
        flex-shrink: 0;
        padding: 0.5rem 1rem;
    }
    
    .chart-card, .chart-card-full { 
        padding: 1rem !important; 
        margin-bottom: 1rem;
    }

    .charts-2col, .stats-2col {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    .mobile-sticky-cta { display: flex; justify-items: center; align-items: center; }
    .mobile-sticky-cta .btn { width: 100%; border-radius: var(--radius-md); }
    
    .bottom-nav { display: block; }
    
    .upload-zone { padding: 2.5rem 1rem; }
    .upload-zone i { width: 44px !important; height: 44px !important; margin-bottom: 1rem !important; }
    
    footer { padding-bottom: 90px !important; } /* Avoid overlap with bottom nav */
    .footer-container { gap: 2rem; padding: 0 1rem; }
    .footer-col { margin-bottom: 1rem; }
}

@media (max-width: 380px) {
    h1 { font-size: 2rem !important; }
    .btn { padding: 0.75rem 1.25rem; font-size: 0.95rem; }
}

/* Home Showcase Slider */
.home-showcase-wrapper {
    width: 100%;
    margin: 6rem auto 7rem;
    max-width: 1150px;
    perspective: 1800px;
    -webkit-perspective: 1800px;
}
.home-showcase-slider {
    position: relative;
    width: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: transparent;
    min-height: 400px;
    transform: rotateX(15deg) rotateY(0deg) rotateZ(0deg) scale(1);
    -webkit-transform: rotateX(15deg) rotateY(0deg) rotateZ(0deg) scale(1);
    box-shadow: 
        0 40px 80px rgba(0,0,0,0.2),
        0 0 0 2px var(--glass-border),
        0 0 0 16px var(--bg-card);
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.6s ease;
}
.home-showcase-slider:hover {
    transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(0,0,0,0.2),
        0 0 0 1px var(--glass-border),
        0 0 0 4px var(--bg-card);
}
.home-slider-track {
    display: flex;
    width: 100%;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}
.home-slide {
    min-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}
.home-slide img {
    width: 100%;
    height: auto;
    display: block;
}

/* Slider Arrows */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%) translateZ(50px);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10;
}
.home-showcase-slider:hover .slider-arrow {
    opacity: 1;
}
.slider-arrow:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) translateZ(60px) scale(1.1);
}
.slider-arrow.prev { left: 20px; }
.slider-arrow.next { right: 20px; }
.slider-arrow i { width: 24px; height: 24px; }

/* Privacy Disclaimer */
.home-privacy-disclaimer {
    box-shadow: inset 0 0 20px rgba(16, 185, 129, 0.05);
    transition: transform 0.3s ease;
}
.home-privacy-disclaimer:hover {
    transform: translateY(-2px);
}

/* Dashboard Tabs */
.view-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.tab-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1.75rem;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
    font-size: 0.95rem;
}

.tab-item i {
    width: 20px;
    height: 20px;
}

.tab-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.tab-item.active {
    background: var(--accent-primary);
    color: white;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
    border-color: rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
    .view-tabs {
        width: 100%;
        gap: 0.5rem;
        padding: 0.4rem;
        margin-bottom: 1.5rem;
    }
    .tab-item {
        flex: 1;
        justify-content: center;
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
        gap: 0.5rem;
    }
}
