/* Styles extracted from market-watch.xyz landing page */
html, body {
    overflow-x: hidden;
}
body {
    display: block;
    background: #f8fafc;
    font-family: 'Inter', sans-serif;
    color: #0f172a;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 6rem 2rem 10rem 2rem;
    background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
    margin-bottom: -4rem;
    /* Overlap effect */
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

/* Articles with dark hero: reset gradient text to white */
[data-tab] .hero-title {
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    -webkit-text-fill-color: currentColor;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #64748b;
    max-width: 800px;
    margin: 0 auto 3rem;
    line-height: 1.6;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 10;
}

/* Cards & Content */
.report-card,
.content-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    /* Subtle border */
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.08);
    /* Premium shadow */
    margin-bottom: 3rem;
}

/* Premium Navigation Grid */
.nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 3rem;
}

.nav-item {
    background: white;
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.nav-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
    color: #2563eb;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-blue {
    background: #eff6ff;
    color: #2563eb;
}

.badge-green {
    background: #f0fdf4;
    color: #16a34a;
}

.badge-red {
    background: #fef2f2;
    color: #dc2626;
}

.badge-purple {
    background: #faf5ff;
    color: #9333ea;
}

/* Typography in Content */
h2 {
    font-size: 2rem;
    font-weight: 800;
    color: #1e293b;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #334155;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #475569;
    margin-bottom: 1.5rem;
}

/* Tables */
.data-table {
    width: 100%;
    margin: 2rem 0;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.data-table th {
    background: #f8fafc;
    padding: 0.6rem 0.75rem;
    text-align: left;
    font-weight: 700;
    color: #64748b;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #e2e8f0;
}

.data-table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    font-size: 0.82rem;
}

.data-table tr:last-child td {
    border-bottom: none;
}

/* Compare Table — dark header variant */
.compare-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    margin: 2rem 0;
    table-layout: fixed;
}

.compare-table th {
    background: #1e293b;
    color: white;
    padding: 1rem;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: left;
    border-bottom: 1px solid #334155;
}

.compare-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.88rem;
    color: #334155;
    line-height: 1.5;
    vertical-align: top;
    word-wrap: break-word;
}

.compare-table tr:nth-child(even) td {
    background: #f8fafc;
}

.compare-table tr:last-child td {
    border-bottom: none;
}

.compare-table td:first-child {
    font-weight: 600;
    color: #0f172a;
}

/* Quote Block */
.quote-block {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #e2e8f0;
    padding: 2rem 2.5rem;
    border-radius: 16px;
    margin: 2rem 0;
    border-left: 4px solid #2563eb;
    position: relative;
}

.quote-block::before {
    content: '\201C';
    font-size: 4rem;
    color: #2563eb;
    position: absolute;
    top: -0.5rem;
    left: 1rem;
    line-height: 1;
    opacity: 0.5;
}

.quote-block p {
    font-size: 1.1rem;
    line-height: 1.8;
    font-style: italic;
    margin: 0;
    padding-left: 1.5rem;
}

.quote-block .quote-author {
    font-style: normal;
    font-weight: 700;
    color: #60a5fa;
    margin-top: 1rem;
    display: block;
    font-size: 0.9rem;
}

/* Takeaway Box */
.takeaway-box {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #1e40af;
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem 0;
}

.takeaway-box h3 {
    color: #1e40af;
    margin-top: 0;
    font-size: 1.1rem;
}

.takeaway-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.takeaway-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
    font-size: 1rem;
    color: #334155;
    line-height: 1.6;
    border-bottom: 1px solid rgba(30, 64, 175, 0.15);
}

.takeaway-list li:last-child {
    border-bottom: none;
}

.takeaway-list li i {
    color: #1e40af;
    margin-top: 0.2rem;
    flex-shrink: 0;
}

/* Disclaimer Mega */
.disclaimer-mega {
    background: linear-gradient(135deg, #450a0a 0%, #7f1d1d 100%);
    color: white;
    padding: 2.5rem;
    border-radius: 20px;
    margin: 2rem 0;
    border: 2px solid #dc2626;
}

.disclaimer-mega h3 {
    color: #fca5a5;
    margin-top: 0;
    font-size: 1.25rem;
}

.disclaimer-mega ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
}

.disclaimer-mega ul li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.5rem 0;
    font-size: 0.95rem;
    color: #fecaca;
    line-height: 1.6;
}

.disclaimer-mega ul li i {
    color: #f87171;
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.disclaimer-mega p {
    color: #fecaca;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Bias Grid */
.bias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.bias-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem;
}

.bias-card h5 {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
    color: #0f172a;
}

.bias-card p {
    margin: 0;
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.6;
}

.bias-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* Layer Card */
.layer-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 2rem;
    margin: 1.25rem 0;
    transition: all 0.3s;
}

.layer-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.12);
}

.layer-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    font-weight: 900;
    font-size: 1rem;
    margin-right: 0.75rem;
    color: white;
}

.layer-macro {
    border-left: 4px solid #2563eb;
}

.layer-macro .layer-number {
    background: #2563eb;
}

.layer-timing {
    border-left: 4px solid #9333ea;
}

.layer-timing .layer-number {
    background: #9333ea;
}

.layer-tactical {
    border-left: 4px solid #f59e0b;
}

.layer-tactical .layer-number {
    background: #f59e0b;
}

.layer-risk {
    border-left: 4px solid #ef4444;
}

.layer-risk .layer-number {
    background: #ef4444;
}

.layer-execution {
    border-left: 4px solid #16a34a;
}

.layer-execution .layer-number {
    background: #16a34a;
}

.checklist {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 0;
}

.checklist li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.6rem 0;
    font-size: 0.95rem;
    color: #334155;
    line-height: 1.5;
}

/* Roadmap Grid */
.roadmap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.roadmap-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    transition: all 0.2s;
}

.roadmap-item:hover {
    border-color: #2563eb;
    background: #eff6ff;
}

.roadmap-item.current {
    border-color: #2563eb;
    background: #eff6ff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.part-num {
    font-size: 1.5rem;
    font-weight: 900;
    color: #2563eb;
}

.part-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0.5rem 0 0.25rem;
}

.part-desc {
    font-size: 0.75rem;
    color: #64748b;
}

/* Score Row */
.score-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.score-item {
    text-align: center;
    padding: 1.25rem;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.score-item .big {
    font-size: 1.8rem;
    font-weight: 800;
}

.score-item .label {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 0.25rem;
}

/* Hall of Fame Card */
.hof-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.75rem;
    margin: 1rem 0;
    border-left: 4px solid #2563eb;
    transition: all 0.3s;
}

.hof-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.12);
}

.legend-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.legend-avatar {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
    font-weight: 900;
}

.legend-name {
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
}

.legend-alias {
    font-size: 0.8rem;
    color: #64748b;
}

.legend-stats {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.legend-stat {
    text-align: center;
}

.legend-stat .stat-value {
    font-size: 1.25rem;
    font-weight: 800;
    color: #2563eb;
}

.legend-stat .stat-label {
    font-size: 0.72rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Next CTA */
.next-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border-radius: 16px;
    margin: 2rem 0;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.next-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.3);
}

.next-cta .next-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.85;
}

.next-cta .next-title {
    font-size: 1.25rem;
    font-weight: 800;
}

.next-cta i {
    font-size: 1.5rem;
}

/* Section Divider */
.section-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 3rem 0 2rem;
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.section-divider::before,
.section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

/* Setup Card (Scanner) */
.setup-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    margin-left: auto;
    margin-right: auto;
    max-width: 1000px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s, box-shadow 0.2s;
}

.setup-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

.setup-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.scanner-ticker-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #1e293b, #334155);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 0.85rem;
    color: white;
    flex-shrink: 0;
}

.setup-header-info h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 800;
    color: #0f172a;
}

.setup-name {
    font-size: 0.8rem;
    color: #64748b;
}

.setup-header-price {
    margin-left: auto;
    text-align: right;
}

.setup-header-price .price {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
}

.setup-header-price .change {
    font-size: 0.85rem;
    font-weight: 600;
}

.setup-badges {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.setup-section {
    margin-top: 1.5rem;
}

.setup-section h4 {
    font-size: 0.85rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.setup-description {
    font-size: 0.92rem;
    color: #334155;
    line-height: 1.6;
}

/* Regime Grid (Scanner) */
.regime-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

/* Switcher Bar */
.switcher-bar {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.switcher-btn {
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    color: #64748b;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.switcher-btn:hover {
    border-color: #2563eb;
    color: #2563eb;
}

.switcher-btn.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

/* Didactic Boxes */
.didactic-box,
.pedagogy-box,
.alert-box {
    padding: 2rem;
    border-radius: 16px;
    margin: 2rem 0;
    position: relative;
    overflow: hidden;
}

.pedagogy-box {
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
}

.alert-box {
    background: #fef2f2;
    border-left: 4px solid #ef4444;
}

.didactic-box {
    background: #f0fdf4;
    border-left: 4px solid #10b981;
}

.didactic-box h4,
.pedagogy-box h4,
.alert-box h4 {
    color: #dc2626 !important;
    margin-top: 0;
    font-weight: 800;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

/* Alert Banner — base styling only, colors set by variant classes or inline */
.alert-banner {
    display: flex;
    align-items: center;
    gap: 1rem;
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #2563eb;
    color: white;
    padding: 12px 24px;
    border-radius: 99px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: #1d4ed8;
}

/* Metric Grid & Cards */
.metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.metric-card {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.1);
}

.metric-value {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.2;
    color: #0f172a;
}

.metric-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.5rem;
}

.metric-change {
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.25rem;
}

.metric-change.up { color: #10b981; }
.metric-change.down { color: #ef4444; }
.metric-change.neutral { color: #64748b; }

/* =====================================================
   RESPONSIVE DESIGN - TABLET (768px)
   ===================================================== */
@media (max-width: 768px) {
    /* Base containers */
    .report-card,
    .content-card {
        padding: 1.25rem !important;
        border-radius: 16px;
        margin-bottom: 1.5rem;
    }

    .container {
        padding: 0 1rem !important;
    }

    /* Hero section */
    .hero-section {
        padding: 2.5rem 1rem 5rem 1rem !important;
    }

    .hero-title {
        font-size: 1.75rem !important;
        line-height: 1.3;
    }

    .hero-subtitle {
        font-size: 1rem !important;
        padding: 0 0.5rem;
    }

    /* Navigation */
    .nav-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem !important;
    }

    .nav-item {
        padding: 0.75rem 0.5rem !important;
        font-size: 0.8rem !important;
    }

    /* Metric cards */
    .metric-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }

    .metric-card {
        padding: 1rem !important;
    }

    .metric-value {
        font-size: 1.25rem !important;
    }

    .metric-label {
        font-size: 0.7rem !important;
    }

    .metric-change {
        font-size: 0.65rem !important;
    }

    /* Data tables - horizontal scroll */
    .data-table {
        font-size: 0.75rem !important;
        display: block !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    .data-table th,
    .data-table td {
        padding: 0.4rem 0.6rem !important;
    }

    /* Charts */
    .chart-container {
        padding: 1rem !important;
    }

    .treemap-container,
    .sankey-container,
    .radar-container {
        height: 280px !important;
    }

    .allocation-donut {
        height: 300px !important;
    }

    /* ECharts containers — cap height on tablets */
    div[id$="Chart"],
    div[id$="chart"],
    div[id*="Chart"],
    div[id*="chart"] {
        max-height: 280px !important;
    }

    /* Tables — scrollable on tablets */
    .data-table,
    table {
        display: block !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        table-layout: auto !important;
    }

    /* Typography */
    h2 {
        font-size: 1.25rem !important;
        line-height: 1.3 !important;
    }

    h3 {
        font-size: 1.1rem !important;
    }

    h4 {
        font-size: 0.95rem !important;
    }

    p, li {
        font-size: 0.9rem !important;
        line-height: 1.6 !important;
    }

    /* Alert boxes */
    .alert-box,
    .didactic-box,
    .pedagogy-box,
    .geo-alert {
        padding: 1rem !important;
        border-radius: 12px !important;
    }

    .alert-banner {
        flex-direction: column !important;
        text-align: center !important;
        padding: 1rem !important;
        gap: 0.75rem !important;
    }

    /* Risk matrix */
    .risk-matrix {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .risk-item {
        padding: 1rem !important;
    }

    /* Football field */
    .football-field {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    .field-row {
        min-width: 500px !important;
    }

    /* Hide mobile class */
    .hide-mobile {
        display: none !important;
    }

    /* Calendar header hide on tablet/mobile */
    .calendar-days-header {
        display: none !important;
    }

    /* Calendar grid as list */
    .calendar-days-grid {
        display: flex !important;
        flex-direction: column !important;
    }

    .calendar-days-grid > div {
        min-height: auto !important;
        border-right: none !important;
        border-bottom: 1px solid #e2e8f0 !important;
        padding: 1rem !important;
    }
}

/* =====================================================
   RESPONSIVE DESIGN - MOBILE (480px)
   ===================================================== */
@media (max-width: 480px) {
    /* ===== RESET GLOBAL ===== */
    body {
        background: #ffffff !important;
    }

    /* ===== CONTAINERS ===== */
    .report-card,
    .content-card {
        padding: 0.75rem !important;
        border-radius: 0 !important;
        margin-bottom: 0.5rem !important;
        box-shadow: none !important;
        border: none !important;
        border-bottom: 1px solid #e2e8f0 !important;
    }

    .container {
        padding: 0 0.5rem !important;
        max-width: 100% !important;
    }

    .chart-container {
        padding: 0.5rem !important;
        border-radius: 0 !important;
        margin: 0.5rem 0 !important;
    }

    /* ===== HERO ===== */
    .hero-section {
        padding: 1.5rem 0.5rem 2rem 0.5rem !important;
        margin-bottom: 0 !important;
        border-radius: 0 !important;
    }

    .hero-title {
        font-size: 1.3rem !important;
    }

    .hero-subtitle {
        font-size: 0.85rem !important;
        margin-bottom: 1rem !important;
    }

    /* ===== NAVIGATION ===== */
    .nav-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.35rem !important;
        margin-bottom: 1rem !important;
        margin-top: -1rem !important;
    }

    .nav-item {
        padding: 0.5rem 0.25rem !important;
        font-size: 0.7rem !important;
        border-radius: 6px !important;
    }

    /* ===== ALERT BANNER ===== */
    .alert-banner {
        padding: 0.75rem !important;
        margin-bottom: 0.75rem !important;
        border-radius: 8px !important;
    }

    /* ===== METRIC CARDS ===== */
    .metric-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.35rem !important;
    }

    .metric-card {
        padding: 0.5rem !important;
        border-radius: 8px !important;
    }

    .metric-value {
        font-size: 1rem !important;
    }

    .metric-label {
        font-size: 0.6rem !important;
    }

    .metric-change {
        font-size: 0.55rem !important;
    }

    /* ===== TYPOGRAPHY ===== */
    h2 {
        font-size: 1rem !important;
        margin-top: 1rem !important;
        margin-bottom: 0.75rem !important;
    }

    h3 {
        font-size: 0.9rem !important;
        margin-top: 0.75rem !important;
        margin-bottom: 0.5rem !important;
    }

    h4, h5 {
        font-size: 0.85rem !important;
        margin-top: 0.5rem !important;
        margin-bottom: 0.35rem !important;
    }

    p, li {
        font-size: 0.8rem !important;
        margin-bottom: 0.5rem !important;
        line-height: 1.5 !important;
    }

    /* Preserve white text on dark backgrounds */
    [style*="background:#0f172a"] p,
    [style*="background: #0f172a"] p,
    [style*="background:#1e1e1e"] p,
    [style*="background: #1e1e1e"] p,
    [style*="color:white"] p,
    [style*="color: white"] p {
        color: white !important;
    }

    /* ===== ALL TABLES - RESPONSIVE ===== */
    .data-table,
    table {
        display: table !important;
        width: 100% !important;
        font-size: 0.7rem !important;
        border-radius: 0 !important;
        margin: 0.5rem 0 !important;
        table-layout: fixed !important;
    }

    .data-table th,
    .data-table td,
    table th,
    table td {
        padding: 0.35rem 0.5rem !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }

    /* Tables inside styled divs */
    table[style],
    div[style] > table {
        font-size: 0.7rem !important;
        width: 100% !important;
        table-layout: fixed !important;
    }

    /* ===== CALENDRIER ===== */
    .calendar-days-header,
    .calendar-days-header[style],
    div.calendar-days-header,
    .hide-mobile {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        overflow: hidden !important;
    }

    .calendar-days-grid {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: none !important;
    }

    .calendar-days-grid > div {
        min-height: auto !important;
        border-right: none !important;
        border-bottom: 1px solid #e2e8f0 !important;
        padding: 0.75rem !important;
    }

    /* ===== FOOTBALL FIELD - SCROLL ===== */
    .football-field {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        margin: 0.5rem -0.5rem !important;
        padding: 0.75rem !important;
        width: calc(100% + 1rem) !important;
    }

    .field-row {
        min-width: 280px !important;
        display: flex !important;
        flex-wrap: nowrap !important;
    }

    .field-label {
        font-size: 0.65rem !important;
        min-width: 70px !important;
        width: 70px !important;
        flex-shrink: 0 !important;
    }

    .field-bar-container {
        flex: 1 !important;
        min-width: 150px !important;
    }

    .field-bar {
        height: 20px !important;
        font-size: 0.6rem !important;
    }

    /* ===== CHARTS ===== */
    .treemap-container,
    .sankey-container,
    .radar-container {
        height: 200px !important;
    }

    .allocation-donut {
        height: 220px !important;
    }

    /* ===== ALERT/DIDACTIC BOXES ===== */
    .alert-box,
    .didactic-box,
    .pedagogy-box,
    .geo-alert {
        padding: 0.5rem !important;
        margin: 0.5rem 0 !important;
        border-radius: 8px !important;
    }

    /* ===== RISK MATRIX ===== */
    .risk-matrix {
        grid-template-columns: 1fr !important;
    }

    .risk-item {
        padding: 0.5rem !important;
        border-radius: 8px !important;
    }

    .risk-item h4 {
        font-size: 0.8rem !important;
    }

    .risk-item p {
        font-size: 0.7rem !important;
        margin-bottom: 0 !important;
    }

    /* ===== BADGE ===== */
    .badge {
        padding: 0.15rem 0.4rem !important;
        font-size: 0.6rem !important;
    }

    /* ===== FORCE INLINE STYLES ===== */

    /* All grids -> single column */
    [style*="grid-template-columns"],
    [style*="display:grid"],
    [style*="display: grid"] {
        display: block !important;
    }

    /* But keep calendar-days-grid as flex column */
    .calendar-days-grid[style] {
        display: flex !important;
        flex-direction: column !important;
    }

    /* All flex -> wrap */
    [style*="display:flex"],
    [style*="display: flex"] {
        flex-wrap: wrap !important;
    }

    /* Reduce inline paddings */
    [style*="padding:1.5rem"],
    [style*="padding: 1.5rem"],
    [style*="padding:2rem"],
    [style*="padding: 2rem"] {
        padding: 0.75rem !important;
    }

    [style*="padding:1.25rem"],
    [style*="padding: 1.25rem"],
    [style*="padding:1rem"],
    [style*="padding: 1rem"] {
        padding: 0.5rem !important;
    }

    /* Reduce inline margins */
    [style*="margin:1.5rem"],
    [style*="margin: 1.5rem"],
    [style*="margin:2rem"],
    [style*="margin: 2rem"] {
        margin: 0.5rem 0 !important;
    }

    [style*="margin:1rem"],
    [style*="margin: 1rem"] {
        margin: 0.35rem 0 !important;
    }

    /* Reduce inline gaps */
    [style*="gap:1.5rem"],
    [style*="gap: 1.5rem"],
    [style*="gap:1rem"],
    [style*="gap: 1rem"] {
        gap: 0.5rem !important;
    }

    /* Reduce border-radius */
    [style*="border-radius:12px"],
    [style*="border-radius: 12px"],
    [style*="border-radius:16px"],
    [style*="border-radius: 16px"],
    [style*="border-radius:24px"],
    [style*="border-radius: 24px"] {
        border-radius: 8px !important;
    }

    /* Theme badges smaller */
    [style*="border-radius:20px"] {
        padding: 0.25rem 0.5rem !important;
        font-size: 0.65rem !important;
        border-radius: 10px !important;
    }

    /* Inline font sizes */
    [style*="font-size:0.9rem"],
    [style*="font-size: 0.9rem"] {
        font-size: 0.75rem !important;
    }

    [style*="font-size:1rem"],
    [style*="font-size: 1rem"],
    [style*="font-size:1.1rem"],
    [style*="font-size: 1.1rem"] {
        font-size: 0.8rem !important;
    }

    [style*="font-size:1.25rem"],
    [style*="font-size: 1.25rem"] {
        font-size: 0.9rem !important;
    }

    /* ===== SPECIFIC SECTIONS ===== */

    /* Regime sectors grid */
    div[style*="display:grid"][style*="minmax(200px"] > div,
    div[style*="display: grid"][style*="minmax(200px"] > div,
    div[style*="display:grid"][style*="minmax(280px"] > div,
    div[style*="display: grid"][style*="minmax(280px"] > div,
    div[style*="display:grid"][style*="minmax(300px"] > div,
    div[style*="display: grid"][style*="minmax(300px"] > div {
        width: 100% !important;
        margin-bottom: 0.5rem !important;
    }

    /* Leaders/Laggards boxes */
    div[style*="background:#f0fdf4"],
    div[style*="background: #f0fdf4"],
    div[style*="background:#fef2f2"],
    div[style*="background: #fef2f2"] {
        padding: 0.75rem !important;
        border-radius: 8px !important;
        margin-bottom: 0.5rem !important;
    }

    /* Info boxes with border */
    div[style*="border:1px solid"],
    div[style*="border: 1px solid"] {
        padding: 0.5rem !important;
        border-radius: 8px !important;
        margin: 0.5rem 0 !important;
    }

    /* Metric-like inline boxes */
    div[style*="text-align:center"][style*="padding"] {
        padding: 0.5rem !important;
    }

    /* ===== HIDE ON MOBILE ===== */
    .hide-mobile {
        display: none !important;
    }

    /* ===== TICKER ANALYSIS MOBILE ===== */
    .ticker-header { padding: 2rem 1rem !important; }
    .ticker-symbol { font-size: 2rem !important; }
    .ticker-price { font-size: 1.5rem !important; }
    .ticker-meta { flex-direction: column !important; align-items: center !important; gap: 0.5rem !important; font-size: 0.8rem !important; }
    .ticker-metrics { grid-template-columns: repeat(2, 1fr) !important; }
    .trade-levels { grid-template-columns: repeat(2, 1fr) !important; gap: 0.75rem !important; }
    .risk-card { padding: 1rem !important; }
    .verdict-grid { grid-template-columns: 1fr !important; }
    .score-card .score-value { font-size: 2rem !important; }

    /* ===== ECHARTS MOBILE FIX ===== */
    /* Reduce chart container heights on small screens */
    div[id$="Chart"],
    div[id$="chart"],
    div[id*="Chart"],
    div[id*="chart"] {
        max-height: 220px !important;
        min-height: 160px !important;
    }

    /* Gauge charts can be smaller */
    div[id*="gauge"],
    div[id*="Gauge"] {
        max-height: 180px !important;
        min-height: 140px !important;
    }

    /* Radar charts need some room */
    div[id*="radar"],
    div[id*="Radar"] {
        max-height: 240px !important;
    }

    /* Treemap/Sankey need width more than height */
    div[id*="treemap"],
    div[id*="Treemap"],
    div[id*="sankey"],
    div[id*="Sankey"] {
        max-height: 200px !important;
    }

    /* Social radar grids */
    .social-radar > div[style*="grid"] {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* ===== TABLE MOBILE FIX ===== */
    /* Replace fixed layout with scrollable wrapper */
    .data-table,
    table {
        table-layout: auto !important;
    }

    /* Tables that overflow: wrap in scrollable container */
    .content-card > .data-table,
    .content-card > table,
    .content-card > div > table {
        display: block !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        white-space: nowrap !important;
        max-width: 100% !important;
    }

    /* But allow text to wrap inside cells */
    .data-table td,
    table td {
        white-space: normal !important;
        min-width: 60px !important;
    }

    /* First column (labels) stays readable */
    .data-table td:first-child,
    table td:first-child,
    .data-table th:first-child,
    table th:first-child {
        font-weight: 600 !important;
        min-width: 80px !important;
        position: sticky !important;
        left: 0 !important;
        background: white !important;
        z-index: 1 !important;
    }

    /* Compare tables */
    .compare-table {
        display: block !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
}

/* ===================================================================== */
/* TICKER ANALYSIS PAGES                                                  */
/* ===================================================================== */

/* --- Hero Header (Light — matches weekly hero-section) --- */
.ticker-header {
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    color: #0f172a;
    padding: 3rem 2rem;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
}
.ticker-brand-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1.5rem;
    text-decoration: none;
    color: #0f172a;
    font-weight: 800;
    font-size: 1.1rem;
}
.ticker-brand-logo {
    height: 28px;
    width: auto;
}
.finviz-wrap {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem;
    box-sizing: border-box;
}
.finviz-wrap > div {
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    transition: border-color 0.2s;
}
.finviz-wrap > div:hover {
    border-color: #3b82f6;
}
.finviz-wrap img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
}
.finviz-wrap .finviz-footer {
    background: #f8fafc;
    padding: 6px 12px;
    font-size: 0.7rem;
    color: #64748b;
    display: flex;
    justify-content: space-between;
}
.ticker-symbol {
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.ticker-name {
    font-size: 1.3rem;
    font-weight: 300;
    color: #64748b;
    margin-top: 0.25rem;
}
.ticker-price {
    font-size: 2.5rem;
    font-weight: 800;
    margin-top: 1rem;
    color: #0f172a;
}
.ticker-meta {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: #64748b;
}
.ticker-meta span { display: flex; align-items: center; gap: 0.35rem; }
.ticker-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.75rem;
    max-width: 700px;
    margin: 1.5rem auto 0;
}
.ticker-metric {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border: 1px solid #e2e8f0;
    border-radius: 8px; /* Slightly smaller radius for aesthetic */
    padding: 0.75rem;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}
.ticker-metric:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.ticker-metric .tm-value { font-size: 1.1rem; font-weight: 800; color: #0f172a; }
.ticker-metric .tm-label { font-size: 0.65rem; color: #64748b; text-transform: uppercase; letter-spacing: 0.05em; margin-top: 0.2rem; }

/* --- Score Card --- */
.score-card {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    margin: 2rem 0;
}
.score-card .score-value { font-size: 3rem; font-weight: 900; }
.score-card .score-label { font-size: 1.1rem; font-weight: 600; margin-top: 0.5rem; }

/* --- Verdict Express --- */
.verdict-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin: 1.5rem 0;
}
.verdict-pro {
    background: #f0fdf4;
    border: 1px solid #16a34a;
    border-radius: 16px;
    padding: 1.5rem;
}
.verdict-con {
    background: #fef2f2;
    border: 1px solid #dc2626;
    border-radius: 16px;
    padding: 1.5rem;
}

/* --- News Items --- */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.news-item {
    background: #f8fafc;
    padding: 1.25rem;
    border-radius: 12px;
    border-left: 4px solid #e2e8f0;
}
.news-item.news-critical { border-left-color: #dc2626; }
.news-item.news-positive { border-left-color: #16a34a; }
.news-item.news-info { border-left-color: #3b82f6; }
.news-item.news-warning { border-left-color: #f59e0b; }
.news-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

/* --- Risk Summary Header --- */
.risk-summary {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-radius: 16px;
    margin-bottom: 1.5rem;
    color: white;
    flex-wrap: wrap;
}
.risk-gauge {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    flex-shrink: 0;
    border: 4px solid;
}
.risk-gauge-score {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
}
.risk-gauge-label { color: #cbd5e1;
    font-size: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.8;
    margin-top: 2px;
}
.risk-summary-detail { flex: 1; min-width: 200px; }
.risk-summary-detail h3 { margin: 0 0 0.5rem; font-size: 1.1rem; font-weight: 700; color: #ffffff; }
.risk-summary-detail p { margin: 0; font-size: 0.85rem; color: #e2e8f0; opacity: 1; line-height: 1.5; }
.risk-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.75rem; }
.risk-tag {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.risk-tag-critical { background: rgba(220,38,38,0.2); color: #fca5a5; }
.risk-tag-high { background: rgba(245,158,11,0.2); color: #fcd34d; }
.risk-tag-medium { background: rgba(59,130,246,0.2); color: #93c5fd; }
.risk-tag-low { background: rgba(22,163,74,0.2); color: #86efac; }

/* --- Risk Grid --- */
.risk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* --- Risk Cards v2 --- */
.risk-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid #e2e8f0;
    transition: transform 0.2s, box-shadow 0.2s;
}
.risk-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.risk-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
}
.risk-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}
.risk-card-header h4 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    flex: 1;
    line-height: 1.3;
}
.risk-severity {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 3px 8px;
    border-radius: 6px;
    flex-shrink: 0;
}
.risk-card-body {
    padding: 1rem 1.25rem;
}
.risk-card-body ul {
    padding-left: 0;
    margin: 0;
    list-style: none;
    font-size: 0.85rem;
    color: #475569;
    line-height: 1.6;
}
.risk-card-body ul li {
    padding: 0.3rem 0;
    padding-left: 1.25rem;
    position: relative;
}
.risk-card-body ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.65rem;
    width: 6px;
    height: 6px;
    border-radius: 50%;
}
.risk-card-body .risk-meters {
    display: flex;
    gap: 1rem;
    margin-top: 0.75rem;
}
.risk-meter {
    flex: 1;
}
.risk-meter-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    margin-bottom: 4px;
}
.risk-meter-bar {
    height: 6px;
    border-radius: 3px;
    background: #f1f5f9;
    overflow: hidden;
}
.risk-meter-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s ease;
}
.risk-card .risk-verdict {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.75rem 1.25rem;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.risk-card .risk-verdict i {
    font-size: 0.7rem;
}

/* Severity colors */
.risk-card-critical .risk-card-icon { background: #fef2f2; color: #dc2626; }
.risk-card-critical .risk-severity { background: #fef2f2; color: #dc2626; }
.risk-card-critical .risk-card-body ul li::before { background: #dc2626; }
.risk-card-critical .risk-meter-fill { background: #dc2626; }
.risk-card-critical .risk-verdict { background: #fef2f2; color: #991b1b; }

.risk-card-high .risk-card-icon { background: #fffbeb; color: #d97706; }
.risk-card-high .risk-severity { background: #fffbeb; color: #b45309; }
.risk-card-high .risk-card-body ul li::before { background: #f59e0b; }
.risk-card-high .risk-meter-fill { background: #f59e0b; }
.risk-card-high .risk-verdict { background: #fffbeb; color: #92400e; }

.risk-card-medium .risk-card-icon { background: #eff6ff; color: #2563eb; }
.risk-card-medium .risk-severity { background: #eff6ff; color: #1d4ed8; }
.risk-card-medium .risk-card-body ul li::before { background: #3b82f6; }
.risk-card-medium .risk-meter-fill { background: #3b82f6; }
.risk-card-medium .risk-verdict { background: #eff6ff; color: #1e40af; }

.risk-card-low .risk-card-icon { background: #f0fdf4; color: #16a34a; }
.risk-card-low .risk-severity { background: #f0fdf4; color: #16a34a; }
.risk-card-low .risk-card-body ul li::before { background: #16a34a; }
.risk-card-low .risk-meter-fill { background: #16a34a; }
.risk-card-low .risk-verdict { background: #f0fdf4; color: #166534; }

/* --- Trade Idea --- */
.trade-box {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white;
    padding: 2rem;
    border-radius: 16px;
    margin: 2rem 0;
}
.trade-box h3 { color: #f97316 !important; margin: 0 0 1.5rem; }
.trade-box > h4, .trade-box > div > h4 { color: #e2e8f0 !important; }
.trade-box [style*="background:#f0fdf4"] h4 { color: #166534 !important; }
.trade-box [style*="background:#fef2f2"] h4 { color: #991b1b !important; }
.trade-box [style*="background:#f0fdf4"] ul,
.trade-box [style*="background:#f0fdf4"] li,
.trade-box [style*="background:#fef2f2"] ul,
.trade-box [style*="background:#fef2f2"] li { color: #334155 !important; }
.trade-box .pedagogy-box { color: #334155 !important; }
.trade-box .pedagogy-box strong { color: #0f172a !important; }
.trade-box .alert-box { color: #334155 !important; }
.trade-box .alert-box strong { color: #0f172a !important; }
.trade-box .alert-box h4 { color: inherit !important; }
.trade-box .alert-box ul, .trade-box .alert-box li { color: #334155 !important; }
.trade-levels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 1rem;
}
.trade-level {
    text-align: center;
    padding: 1rem;
    border-radius: 12px;
}
.trade-level .label { font-size: 0.7rem; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.05em; }
.trade-level .value { font-size: 1.4rem; font-weight: 800; margin-top: 0.25rem; }
.trade-entry { background: rgba(59,130,246,0.15); }
.trade-entry .value { color: #3b82f6; }
.trade-stop { background: rgba(220,38,38,0.15); }
.trade-stop .value { color: #dc2626; }
.trade-tp { background: rgba(22,163,74,0.15); }
.trade-tp .value { color: #16a34a; }
.trade-rr { background: rgba(249,115,22,0.15); }
.trade-rr .value { color: #f97316; }

/* ============================== */
/* Language & Level Switcher      */
/* ============================== */
.article-switcher {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 1.25rem auto 0;
    padding: 0.5rem 0.75rem;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px; /* Slightly smaller radius for aesthetic */
    flex-wrap: wrap;
    max-width: 500px;
}
.level-switcher {
    display: flex;
    gap: 0.25rem;
    background: #e2e8f0;
    border-radius: 8px;
    padding: 3px;
}
.level-tab {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}
.level-tab:hover { color: #0f172a; background: rgba(0,0,0,0.05); }
.level-tab.active { background: #ffffff; color: #0f172a; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.lang-switcher {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.lang-flag {
    font-size: 1.3rem;
    text-decoration: none;
    opacity: 0.4;
    transition: opacity 0.2s, transform 0.2s;
    cursor: pointer;
    filter: grayscale(50%);
}
.lang-flag:hover { opacity: 0.9; transform: scale(1.15); filter: grayscale(0%); }
.lang-flag.active { opacity: 1; transform: scale(1.1); filter: grayscale(0%); }

/* RTL Support */
[dir="rtl"] .ticker-header,
[dir="rtl"] .content-card,
[dir="rtl"] .verdict-grid { direction: rtl; text-align: right; }
[dir="rtl"] .article-switcher { flex-direction: row-reverse; }
[dir="rtl"] .level-switcher { flex-direction: row-reverse; }

@media (max-width: 480px) {
    .article-switcher { flex-direction: column; align-items: stretch; }
    .level-switcher { justify-content: center; }
    .lang-switcher { justify-content: center; }
}

/* ===================== */
/* Source References      */
/* ===================== */
.source-ref {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    color: #64748b;
    text-decoration: none;
    border-bottom: 1px dotted #cbd5e1;
    padding-bottom: 1px;
    transition: color 0.2s, border-color 0.2s;
    margin-left: 0.25rem;
    white-space: nowrap;
}
.source-ref:hover {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
}
.source-ref .source-icon {
    font-size: 0.6rem;
    opacity: 0.7;
}
.source-ref .source-name {
    font-weight: 500;
}
.source-ref .source-date {
    opacity: 0.6;
    font-style: italic;
}
.source-refs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e2e8f0;
}
/* RTL source refs */
[dir="rtl"] .source-ref {
    margin-left: 0;
    margin-right: 0.25rem;
    flex-direction: row-reverse;
}
[dir="rtl"] .source-refs {
    flex-direction: row-reverse;
}
/* Code formatting fixes */
pre {
    background: #0f172a;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.85rem;
    white-space: pre-wrap;       /* css-3 */
    white-space: -moz-pre-wrap;  /* Mozilla, since 1999 */
    white-space: -pre-wrap;      /* Opera 4-6 */
    white-space: -o-pre-wrap;    /* Opera 7 */
    word-wrap: break-word;       /* Internet Explorer 5.5+ */
    font-family: inherit;
    line-height: 1.5;
}

code {
    font-family: inherit;
    background: #f1f5f9;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85em;
    color: #ef4444;
}

pre code {
    background: transparent;
    padding: 0;
    color: inherit;
}

/* Clickable Tags in Articles */
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
#article-clickable-tags {
    justify-content: center;
    margin-top: 1.5rem;
}

.card-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.card-tag:hover {
    transform: translateY(-1px);
    filter: brightness(0.9);
}

.card-tag[data-cat="region"] { background: #eff6ff; color: #2563eb; border-color: #dbeafe; }
.card-tag[data-cat="sector"] { background: #f0fdf4; color: #16a34a; border-color: #dcfce7; }
.card-tag[data-cat="theme"] { background: #faf5ff; color: #9333ea; border-color: #f3e8ff; }
.card-tag[data-cat="content"] { background: #fffbeb; color: #d97706; border-color: #fef3c7; }
.card-tag[data-cat="special"] { background: #fef2f2; color: #dc2626; border-color: #fecaca; font-weight: 700; }

/* ==========================================================
   ASTRO STANDARDIZED COMPONENTS
   Consolidated from inline styles across daily/weekly/scanner
   ========================================================== */

/* ===== BRAND BAR — matches market-watch.xyz ===== */
.brand-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(248, 250, 252, 0.92);
}

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

.brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.brand-logo:hover .brand-title { color: #2563eb; }

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

.brand-title {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    color: #0f172a;
    letter-spacing: 0.02em;
}

.brand-nav {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.brand-nav a {
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    text-decoration: none;
    color: #64748b;
    transition: all 0.15s;
    white-space: nowrap;
}

.brand-nav a:hover {
    background: #eff6ff;
    color: #2563eb;
}

.brand-nav a.active,
html[data-tab="weekly"] .brand-nav a[href*="weekly"],
html[data-tab="daily"] .brand-nav a[href*="daily"],
html[data-tab="analyses"] .brand-nav a[href*="analyses"],
html[data-tab="scanner"] .brand-nav a[href*="scanner"],
html[data-tab="series"] .brand-nav a[href*="series"],
html[data-tab="tech"] .brand-nav a[href*="series"] {
    background: #2563eb;
    color: #fff;
}

.brand-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.brand-home-btn {
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    color: #64748b;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.brand-home-btn:hover {
    border-color: #2563eb;
    color: #2563eb;
}

/* ===== LEGACY SERIES NAV (dark gradient wizard) ===== */
.series-nav {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    padding: 0.75rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.series-nav .series-title {
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-right: 1rem;
}

.series-link {
    padding: 0.4rem 1rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    color: #94a3b8;
    border: 1px solid #334155;
    transition: all 0.2s;
}

.series-link:hover {
    border-color: #60a5fa;
    color: #60a5fa;
}

.series-link.current {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

@media (max-width: 480px) {
    .series-nav {
        padding: 0.5rem 0.75rem;
        gap: 0.35rem;
    }
    .series-nav .series-title {
        font-size: 0.65rem;
        margin-right: 0.5rem;
    }
    .series-link {
        padding: 0.3rem 0.6rem;
        font-size: 0.65rem;
    }
}

/* ===== SERIES BAR (inline wizard, top + bottom) ===== */
.series-bar {
    background: transparent;
    border-bottom: 1px solid rgba(0,0,0,.06);
}

.series-bar-bottom {
    margin-top: 3rem;
}

.series-bar-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.6rem 1.5rem;
}

.series-title {
    font-size: 0.72rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;
}

.series-steps {
    display: flex;
    align-items: center;
    gap: 2px;
}

.series-step {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.5rem;
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 600;
    color: #cbd5e1;
    border-radius: 6px;
    transition: all 0.15s;
    white-space: nowrap;
}

.series-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #e2e8f0;
    font-size: 0.6rem;
    font-weight: 800;
    color: #cbd5e1;
    flex-shrink: 0;
    transition: all 0.15s;
}

.series-label { display: none; }

.series-step:hover { color: #64748b; background: rgba(0,0,0,0.03); }
.series-step:hover .series-num { border-color: #94a3b8; color: #64748b; }

.series-step.done .series-num { background: #10b981; border-color: #10b981; color: white; }
.series-step.current { color: #2563eb; }
.series-step.current .series-num { background: #2563eb; border-color: #2563eb; color: white; }
.series-step.current .series-label { display: inline; }

.series-counter {
    font-size: 0.72rem;
    color: #94a3b8;
    font-weight: 700;
    white-space: nowrap;
}

.series-arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    color: #475569;
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 600;
    transition: all 0.15s;
    white-space: nowrap;
}
.series-arrow i { font-size: 0.65rem; }
.series-arrow:hover { background: #2563eb; border-color: #2563eb; color: white; }
.series-arrow.disabled { color: #e2e8f0; pointer-events: none; border-color: #f1f5f9; }

/* ===== FLOATING NAV (FAB + dropdown) ===== */
.fnav {
    position: fixed;
    bottom: 1.5rem;
    right: max(1.5rem, calc((100vw - 1200px) / 2));
    z-index: 200;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

/* FAB button */
.fnav-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 99px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(37,99,235,0.3), 0 0 0 1px rgba(255,255,255,0.1);
    transition: all 0.2s;
}
.fnav-btn:hover { background: #1d4ed8; transform: scale(1.03); }
.fnav-btn.open { background: #dc2626; box-shadow: 0 4px 20px rgba(220,38,38,0.3); }
.fnav-btn i { font-size: 0.8rem; width: 16px; text-align: center; }
.fnav-btn-label {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Dropdown menu (opens upward) */
.fnav-menu {
    position: absolute;
    bottom: calc(100% + 0.5rem);
    right: 0;
    min-width: 220px;
    max-height: 70vh;
    overflow-y: auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.05);
    padding: 0.4rem;
    opacity: 0;
    transform: translateY(8px) scale(0.95);
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
    transform-origin: bottom right;
}
.fnav-menu.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Section items */
.fnav-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    text-decoration: none;
    color: #475569;
    font-size: 0.82rem;
    font-weight: 500;
    transition: all 0.12s;
    cursor: pointer;
}
.fnav-item i {
    width: 18px;
    text-align: center;
    font-size: 0.78rem;
    color: #94a3b8;
    flex-shrink: 0;
}
.fnav-item:hover {
    background: #f1f5f9;
    color: #0f172a;
}
.fnav-item.active {
    background: #eff6ff;
    color: #2563eb;
    font-weight: 700;
    border-left: 3px solid #2563eb;
    padding-left: calc(0.75rem - 3px);
}
.fnav-item.active i { color: #2563eb; }

/* Controls row at top of menu */
.fnav-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem 0.5rem;
    margin-bottom: 0.25rem;
    border-bottom: 1px solid #f1f5f9;
}

.fnav-levels {
    display: flex;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
}
.fnav-lvl {
    padding: 0.2rem 0.5rem;
    font-size: 0.68rem;
    font-weight: 600;
    text-decoration: none;
    color: #94a3b8;
    transition: all 0.15s;
    border-right: 1px solid #e2e8f0;
}
.fnav-lvl:last-child { border-right: none; }
.fnav-lvl:hover { color: #475569; background: #f8fafc; }
.fnav-lvl.active { background: #2563eb; color: white; }

.fnav-langs { display: flex; gap: 0.15rem; }
.fnav-lang {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    font-size: 0.78rem;
    text-decoration: none;
    border: 1px solid transparent;
    transition: all 0.15s;
    opacity: 0.45;
}
.fnav-lang:hover { opacity: 0.8; border-color: #e2e8f0; background: #f8fafc; }
.fnav-lang.active { opacity: 1; border-color: #2563eb; background: #eff6ff; }

/* --- Responsive --- */
@media (max-width: 768px) {
    .fnav { bottom: 1rem; right: 1rem; }
    .fnav-btn { padding: 0.5rem 0.85rem; font-size: 0.75rem; }
    .fnav-menu { min-width: 200px; }
    .fnav-item { font-size: 0.78rem; padding: 0.5rem 0.65rem; }

    .series-bar-inner { padding: 0.5rem 0.75rem; gap: 0.5rem; }
    .series-title { display: none; }
    .series-label { display: none !important; }
    .series-step { padding: 0.25rem 0.3rem; }
}

@media (min-width: 769px) {
    .series-label { display: inline; }
}

/* ===== HERO DATE LINE ===== */
.hero-date {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

/* ===== HERO BADGES (pill-shaped) ===== */
.hero-badges {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 700;
}

.hero-badge-red {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.hero-badge-green {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.hero-badge-blue {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.hero-badge-purple {
    background: rgba(147, 51, 234, 0.1);
    color: #9333ea;
    border: 1px solid rgba(147, 51, 234, 0.2);
}

.hero-badge-amber {
    background: rgba(217, 119, 6, 0.1);
    color: #d97706;
    border: 1px solid rgba(217, 119, 6, 0.2);
}

.hero-badge-silver {
    background: rgba(148, 163, 184, 0.15);
    color: #475569;
    border: 1px solid rgba(148, 163, 184, 0.4);
}

/* ===== ALERT BANNER (subtle style, from daily/20260220) ===== */
.alert-banner {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, #fef2f2, #fff7ed);
    border: 1px solid #fecaca;
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
}

.alert-banner-icon {
    width: 48px;
    height: 48px;
    background: #dc2626;
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.alert-banner-icon.icon-green { background: #10b981; }
.alert-banner-icon.icon-blue { background: #3b82f6; }
.alert-banner-icon.icon-amber { background: #f59e0b; }

.alert-banner-content h4 {
    margin: 0 0 0.25rem;
    font-size: 1rem;
    font-weight: 800;
    color: #991b1b;
}

.alert-banner-content p {
    margin: 0;
    font-size: 0.9rem;
    color: #b91c1c;
    line-height: 1.5;
}

/* Green variant */
.alert-banner.alert-green {
    background: rgba(16, 185, 129, 0.1);
    border-color: #10b981;
}
.alert-banner.alert-green .alert-banner-content h4 { color: #15803d; }
.alert-banner.alert-green .alert-banner-content p { color: #166534; }

/* Blue variant */
.alert-banner.alert-blue {
    background: rgba(59, 130, 246, 0.1);
    border-color: #93c5fd;
}
.alert-banner.alert-blue .alert-banner-content h4 { color: #1e40af; }
.alert-banner.alert-blue .alert-banner-content p { color: #1d4ed8; }

/* ===== DASHBOARD GRID (dash-cards with colored top bar) ===== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin: 2rem 0;
}

.dash-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
}

.dash-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.dash-card.card-green::before { background: #10b981; }
.dash-card.card-red::before { background: #ef4444; }
.dash-card.card-blue::before { background: #3b82f6; }
.dash-card.card-amber::before { background: #f59e0b; }
.dash-card.card-purple::before { background: #9333ea; }

.dash-card-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
}

.dash-card-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0.25rem 0;
}

.dash-card-change {
    font-weight: 700;
    font-size: 0.85rem;
}

.dash-card-change.up { color: #10b981; }
.dash-card-change.down { color: #ef4444; }
.dash-card-change.neutral { color: #64748b; }

/* ===== TRADE BOX ENHANCEMENTS ===== */
.trade-title {
    color: #38bdf8;
    font-size: 1.1rem;
    margin: 0 0 1rem;
}

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

.trade-level-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
}

.trade-level-label {
    font-size: 0.6rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.trade-level-value {
    font-size: 1.1rem;
    font-weight: 800;
    margin-top: 0.25rem;
}

.trade-level-value.entry { color: #38bdf8; }
.trade-level-value.stop { color: #f87171; }
.trade-level-value.tp { color: #34d399; }
.trade-level-value.rr { color: #a78bfa; }

.trade-signals {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-top: 1rem;
}

.trade-signals h4 {
    font-size: 0.9rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
}

.trade-signals ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.trade-signals li {
    font-size: 0.85rem;
    padding: 0.25rem 0;
}

.trade-signals li::before {
    margin-right: 0.5rem;
}

.trade-signals-bull {
    background: #f0fdf4;
    border: 1px solid #16a34a;
    color: #15803d;
}

.trade-signals-bull li::before {
    content: "\2713";
    color: #16a34a;
}

.trade-signals-bear {
    background: #fef2f2;
    border: 1px solid #dc2626;
    color: #991b1b;
}

.trade-signals-bear li::before {
    content: "\2717";
    color: #dc2626;
}

/* ===== SOCIAL RADAR ===== */
.social-radar {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.5rem;
    margin: 2rem 0;
}

/* ===== ARTICLE FOOTER (light, centered) ===== */
.article-footer {
    text-align: center;
    padding: 3rem 0;
    color: #64748b;
    font-size: 0.85rem;
    line-height: 1.6;
}

.article-footer a {
    color: #3b82f6;
    text-decoration: none;
}

.article-footer a:hover {
    text-decoration: underline;
}

/* ===== TABLE RESPONSIVE WRAPPER ===== */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ===== TICKER DATE ===== */
.ticker-date {
    margin-top: 1rem;
    font-size: 0.8rem;
    color: #64748b;
    text-align: center;
}

/* ===== RISK METRICS ===== */
.risk-metrics {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #64748b;
}

/* ===== CALENDAR ENHANCEMENTS ===== */
.calendar-day {
    min-width: 0;
}

.calendar-event {
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    font-size: 0.78rem;
    margin-bottom: 0.3rem;
}

.event-time {
    font-weight: 700;
    margin-right: 0.3rem;
}

.event-critical {
    background: #fef2f2;
    border-left: 3px solid #dc2626;
    color: #991b1b;
}

.event-important {
    background: #fffbeb;
    border-left: 3px solid #f59e0b;
    color: #92400e;
}

.event-normal {
    background: #f0f9ff;
    border-left: 3px solid #3b82f6;
    color: #1e40af;
}

/* ===== NEWS ENHANCEMENTS ===== */
.news-header {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.news-source,
.news-date {
    font-size: 0.75rem;
    color: #94a3b8;
}

/* ===== CODE BLOCKS (Shiki syntax highlighting) ===== */
.code-block-wrapper {
    margin: 1.5rem 0;
}

.code-label {
    display: block;
    font-size: 0.65rem;
    color: #0d9488;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* Shiki-generated pre/code blocks */
.astro-code,
pre:has(> code) {
    background: #1e293b !important;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem 0;
    overflow-x: auto;
    font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
    font-size: 0.85rem;
    line-height: 1.7;
    tab-size: 4;
}

.astro-code code,
pre > code {
    background: transparent !important;
    border: none;
    padding: 0;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

/* Inline code (not in pre blocks) */
:not(pre) > code {
    background: #f1f5f9;
    color: #0f172a;
    padding: 0.15em 0.4em;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85em;
    border: 1px solid #e2e8f0;
}

/* ===== MERMAID DIAGRAMS ===== */
.mermaid-container {
    margin: 1.5rem 0;
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.mermaid-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.25rem;
}

.mermaid-subtitle {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 1rem;
}

.mermaid {
    display: flex;
    justify-content: center;
}

.mermaid svg {
    max-width: 100%;
    height: auto;
}

/* ===== MODAL OVERLAY (shared) ===== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    max-width: 480px;
    width: 92%;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #0f172a;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #64748b;
    line-height: 1;
}

.modal-close:hover {
    color: #0f172a;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* History Modal Entries */
.history-btn {
    background: none;
    border: 1px solid #cbd5e1;
    color: #64748b;
    cursor: pointer;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-family: inherit;
    transition: 0.2s;
}

.history-btn:hover {
    border-color: #2563eb;
    color: #2563eb;
}

.history-entry {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 8px; /* Slightly smaller radius for aesthetic */
}

.history-current {
    background: #eff6ff;
    border: 1px solid #3b82f6;
}

.history-link {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    color: inherit;
    transition: 0.2s;
}

.history-link:hover {
    border-color: #3b82f6;
}

.history-entry-info {
    flex: 1;
}

.history-entry-date {
    font-weight: 700;
    font-size: 0.9rem;
    color: #0f172a;
}

.history-entry-title {
    font-size: 0.75rem;
    color: #64748b;
}

.history-badge-current {
    font-size: 0.7rem;
    background: #3b82f6;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

/* ===== VARIANT SWITCHER ===== */
.variant-switcher {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.level-switcher {
    display: flex;
    gap: 0.25rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 3px;
    border: 1px solid #e2e8f0;
}

.level-tab {
    padding: 4px 12px;
    border: none;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    background: transparent;
    color: #64748b;
    font-family: 'Inter', sans-serif;
}

.level-tab.active {
    background: white;
    color: #0f172a;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.level-tab:hover:not(.active) {
    color: #334155;
}

.lang-switcher {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.lang-flag {
    font-size: 1.2rem;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s;
    opacity: 0.5;
}

.lang-flag.active {
    opacity: 1;
}

.lang-flag:hover {
    opacity: 0.8;
}

/* ===== CHART MODAL ===== */
.chart-modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 1100;
    background: rgba(15, 23, 42, 0.95);
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.chart-modal.active {
    display: flex;
}

.chart-modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    color: white;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    z-index: 1101;
}

.chart-modal-close:hover {
    opacity: 0.7;
}

.chart-modal-img {
    max-width: 90%;
    max-height: 80vh;
    border-radius: 8px;
}

.chart-modal-link {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: #3b82f6;
    color: white;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}

.chart-modal-link:hover {
    background: #2563eb;
}

.chart-modal-links {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .brand-bar-inner {
        padding: 0.5rem 1rem;
    }
    .brand-title {
        display: none;
    }
    .brand-nav {
        display: none;
    }
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .trade-levels-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .astro-code,
    pre:has(> code) {
        padding: 1rem;
        font-size: 0.78rem;
        border-radius: 8px;
    }
    .bias-grid {
        grid-template-columns: 1fr;
    }
    .roadmap-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .score-row {
        grid-template-columns: repeat(2, 1fr);
    }
    .regime-grid {
        grid-template-columns: 1fr;
    }
    .compare-table {
        display: block;
        overflow-x: auto;
    }
    .setup-header-price {
        margin-left: 0;
        width: 100%;
        text-align: left;
    }
    .layer-card {
        padding: 1.25rem;
    }
    .quote-block {
        padding: 1.5rem;
    }
    .quote-block p {
        font-size: 0.95rem;
        padding-left: 1rem;
    }
    .variant-switcher {
        margin-top: 1rem;
    }
    .chart-modal-img {
        max-width: 98%;
    }
}

/* ===== PARCOURS / LEARNING PATHS ===== */
/* ── Series Tab Header ───────────────────────────────── */
.series-tab-header {
    text-align: center;
    margin: 2rem 0 1.25rem;
}
.series-tab-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.series-tab-title i { color: #6366f1; }
.series-tab-sub {
    color: #94a3b8;
    margin: 0.4rem 0 0;
    font-size: 0.92rem;
    line-height: 1.5;
}

/* ── Parcours Guidés ─────────────────────────────────── */
.parcours-section {
    max-width: 920px;
    margin: 0.5rem auto 2.5rem;
}
.parcours-section > h3 {
    font-size: 0.7rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin: 0 0 1.25rem 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.parcours-section > h3 i { font-size: 0.75rem; }
.parcours-item {
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 20px;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
    overflow: hidden;
}
.parcours-item:hover {
    box-shadow: 0 8px 30px -6px rgba(0,0,0,0.1);
}
.parcours-item[open] {
    border-color: rgba(0,0,0,0.08);
    box-shadow: 0 12px 40px -8px rgba(0,0,0,0.12);
}
.parcours-item summary {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    list-style: none;
    font-weight: 700;
    font-size: 1rem;
    color: #0f172a;
    background: transparent;
    border: none;
    border-radius: 0;
    transition: background 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.parcours-item summary::-webkit-details-marker { display: none; }
.parcours-item summary::before { display: none; }
.parcours-item summary:hover { background: rgba(0,0,0,0.015); }
.parcours-item[open] summary {
    background: transparent;
    padding-bottom: 0.75rem;
}
.parcours-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.parcours-meta { flex: 1; min-width: 0; }
.parcours-meta .parcours-title {
    display: block;
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.3;
}
.parcours-meta .parcours-sub {
    display: block;
    font-size: 0.77rem;
    color: #94a3b8;
    font-weight: 500;
    margin-top: 0.2rem;
    letter-spacing: 0.01em;
}
.parcours-chevron {
    color: #cbd5e1;
    font-size: 0.7rem;
    transition: transform 0.3s cubic-bezier(.4,0,.2,1), color 0.2s;
    flex-shrink: 0;
}
.parcours-item[open] .parcours-chevron {
    transform: rotate(90deg);
    color: #64748b;
}
.parcours-steps {
    padding: 0 1.25rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.parcours-step {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    text-decoration: none;
    color: #334155;
    font-size: 0.88rem;
    transition: background 0.15s, transform 0.15s;
    position: relative;
}
.parcours-step:hover {
    background: #f8fafc;
    transform: translateX(2px);
}
.parcours-step-num {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 800;
    color: #94a3b8;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s;
}
.parcours-step:hover .parcours-step-num {
    background: #e2e8f0;
    color: #64748b;
}
.parcours-step-new .parcours-step-num {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    box-shadow: 0 2px 6px rgba(37,99,235,0.3);
}
.parcours-step-new:hover .parcours-step-num {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
}
.parcours-step-title {
    font-weight: 600;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.parcours-step-badge {
    font-size: 0.62rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    background: #f1f5f9;
    color: #64748b;
    margin-left: auto;
    flex-shrink: 0;
    letter-spacing: 0.02em;
}
.parcours-step-badge-new {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    color: #2563eb;
    font-weight: 800;
}
@media (max-width: 768px) {
    .parcours-section { margin: 0.5rem auto 1.5rem; }
    .parcours-item summary { padding: 1rem 1.15rem; gap: 0.85rem; }
    .parcours-icon { width: 38px; height: 38px; font-size: 0.95rem; border-radius: 10px; }
    .parcours-meta .parcours-title { font-size: 0.95rem; }
    .parcours-steps { padding: 0 0.85rem 1rem; }
    .parcours-step { padding: 0.55rem 0.65rem; font-size: 0.82rem; gap: 0.65rem; }
    .parcours-step-num { width: 24px; height: 24px; font-size: 0.65rem; }
    .parcours-step-badge { font-size: 0.58rem; padding: 0.15rem 0.4rem; }
}
