/* ============================================================
   ByteCurate — Blog Design System v2
   Redesign: comparison-first, mobile-first, conversion-optimized
   ============================================================ */

/* ============================================================
   1. DESIGN TOKENS
   ============================================================ */
:root {
    /* Colors */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --primary-bg: #eef2ff;
    --primary-bg-subtle: #f5f7ff;

    --bg: #ffffff;
    --bg-alt: #f8fafc;
    --bg-card: #ffffff;
    --bg-warm: #fffbf5;

    --text: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    --border: #e2e8f0;
    --border-light: #f1f5f9;

    --success: #10b981;
    --success-bg: #ecfdf5;
    --success-dark: #059669;
    --warning: #f59e0b;
    --warning-bg: #fffbeb;
    --danger: #ef4444;
    --danger-bg: #fef2f2;

    --score-excellent: #10b981;
    --score-good: #6366f1;
    --score-average: #f59e0b;
    --score-poor: #ef4444;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    --space-4xl: 96px;

    /* Typography */
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --text-xs: 0.75rem;    /* 12px */
    --text-sm: 0.875rem;   /* 14px */
    --text-base: 1rem;     /* 16px */
    --text-md: 1.0625rem;  /* 17px */
    --text-lg: 1.125rem;   /* 18px */
    --text-xl: 1.25rem;    /* 20px */
    --text-2xl: 1.5rem;    /* 24px */
    --text-3xl: 1.875rem;  /* 30px */
    --text-4xl: 2.25rem;   /* 36px */

    --leading-tight: 1.2;
    --leading-snug: 1.35;
    --leading-normal: 1.6;
    --leading-relaxed: 1.8;

    /* Layout */
    --max-width: 1200px;
    --content-width: 740px;
    --sidebar-width: 280px;

    /* Radius */
    --radius: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
    --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
    --shadow-primary: 0 4px 14px rgba(99,102,241,0.25);

    /* Transitions */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --duration: 0.2s;
}

/* ============================================================
   2. RESET & BASE
   ============================================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: var(--leading-normal);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: var(--text-base);
}

a { color: var(--primary); text-decoration: none; transition: color var(--duration) var(--ease); }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; height: auto; display: block; }

/* ============================================================
   3. LAYOUT
   ============================================================ */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-md); }
.container-narrow { max-width: var(--content-width); margin: 0 auto; padding: 0 var(--space-md); }

/* Article with sidebar layout (desktop) */
.article-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

@media (min-width: 1024px) {
    .article-layout {
        grid-template-columns: 1fr var(--sidebar-width);
        padding: 0 var(--space-lg);
    }
}

/* ============================================================
   4. HEADER — Sticky, transparent blur
   ============================================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-light);
    transition: box-shadow var(--duration) var(--ease);
}
.site-header.scrolled {
    box-shadow: var(--shadow);
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: var(--text-xl);
    color: var(--text);
}
.logo:hover { color: var(--text); }
.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-sm);
    font-weight: 800;
    font-size: var(--text-base);
}

.main-nav { display: flex; align-items: center; gap: var(--space-xs); }
.nav-link {
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--duration) var(--ease);
    text-decoration: none;
}
.nav-link:hover { background: var(--bg-alt); color: var(--text); }

/* Desktop dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}
.nav-dropdown-btn svg { transition: transform 0.2s; }
.nav-dropdown:hover .nav-dropdown-btn svg { transform: rotate(180deg); }
.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 8px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 8px;
    min-width: 220px;
    z-index: 200;
}
.nav-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 12px;
}
.nav-dropdown:hover .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
    display: block;
    padding: 10px 16px;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all 0.15s;
}
.nav-dropdown-menu a:hover { background: var(--bg-alt); color: var(--primary); }

.mobile-menu-btn { display: none; background: none; border: none; cursor: pointer; padding: var(--space-sm); }
.mobile-menu-btn span { display: block; width: 20px; height: 2px; background: var(--text); margin: 4px 0; transition: var(--duration); border-radius: 1px; }

/* Mobile nav */
.mobile-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    padding: var(--space-md);
    z-index: 99;
    max-height: 80vh;
    overflow-y: auto;
}
.mobile-nav.open { display: flex; flex-direction: column; gap: 2px; }
.mobile-nav .nav-link {
    display: block;
    padding: 12px var(--space-md);
    font-size: var(--text-base);
    border-radius: var(--radius-sm);
}
.mobile-nav-label {
    display: block;
    padding: 16px 16px 6px;
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.mobile-nav .nav-link-sub {
    padding-left: 28px;
    font-size: var(--text-sm);
    color: var(--text-secondary);
}
.mobile-nav .nav-link-sub:hover { color: var(--primary); }

@media (max-width: 768px) {
    .main-nav { display: none; }
    .mobile-menu-btn { display: block; }
}

/* ============================================================
   5. HERO (Home page)
   ============================================================ */
.hero {
    padding: var(--space-3xl) 0 var(--space-2xl);
    text-align: center;
    background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
}
.hero h1 {
    font-size: var(--text-4xl);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: var(--leading-tight);
}
.hero .highlight { color: var(--primary); }
.hero-sub {
    margin: var(--space-md) auto 0;
    max-width: 560px;
    color: var(--text-secondary);
    font-size: var(--text-lg);
}
.hero-categories {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    flex-wrap: wrap;
    margin-top: var(--space-xl);
}
.category-pill {
    padding: 8px 18px;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--duration) var(--ease);
}
.category-pill:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-bg); }

/* ============================================================
   6. ARTICLE CARDS GRID (Home / Category)
   ============================================================ */
.articles-section { padding: var(--space-3xl) 0; }
.section-title { font-size: var(--text-2xl); font-weight: 700; margin-bottom: var(--space-xl); }

.articles-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
}
@media (min-width: 640px) {
    .articles-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
    .articles-grid { grid-template-columns: repeat(3, 1fr); }
    .article-card.featured { grid-column: span 2; }
}

.article-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all var(--duration) var(--ease);
}
.article-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.card-image { display: block; aspect-ratio: 16/9; overflow: hidden; background: var(--bg-alt); position: relative; }
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s var(--ease); }
.article-card:hover .card-image img { transform: scale(1.03); }

/* Logo overlay on card images */
.card-logos {
    position: absolute;
    bottom: 12px;
    left: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 2;
}
.card-logos-multi { gap: 6px; }
.card-logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    padding: 5px;
    object-fit: contain;
    transition: transform 0.3s var(--ease);
}
.article-card.featured .card-logo { width: 48px; height: 48px; }
.article-card:hover .card-logo { transform: translateY(-2px); }
.card-type-label {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 4px 10px;
    border-radius: 6px;
    z-index: 2;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.card-type-review { color: #4f46e5; }
.card-type-comparison { color: #b45309; }
.card-type-news { color: #15803d; }
.card-type-tutorial { color: #0369a1; }
.card-type-listicle { color: #be185d; }


.card-body { padding: var(--space-lg); }
.card-category {
    display: inline-block;
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
    margin-bottom: var(--space-sm);
}
.card-body h3 { font-size: var(--text-lg); font-weight: 700; line-height: var(--leading-snug); }
.card-body h3 a { color: var(--text); }
.card-body h3 a:hover { color: var(--primary); }
.card-excerpt { margin-top: var(--space-sm); color: var(--text-secondary); font-size: var(--text-sm); line-height: 1.5; }
.card-meta { display: flex; gap: var(--space-md); margin-top: 12px; font-size: 0.8rem; color: var(--text-muted); }

/* ============================================================
   7. ARTICLE PAGE — Header, Breadcrumb, Meta
   ============================================================ */
.article-page { padding: var(--space-xl) 0 var(--space-4xl); }

.breadcrumb {
    display: flex;
    gap: var(--space-sm);
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--primary); }

.article-header { margin-bottom: var(--space-xl); }
.article-header h1 {
    font-size: var(--text-3xl);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: var(--leading-tight);
    margin-top: var(--space-sm);
}
.article-excerpt {
    margin-top: var(--space-md);
    font-size: var(--text-lg);
    color: var(--text-secondary);
    line-height: var(--leading-normal);
}
.article-meta {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-md);
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.article-hero-img {
    margin-bottom: var(--space-xl);
    border-radius: var(--radius);
    overflow: hidden;
}

/* ============================================================
   8. TABLE OF CONTENTS — Sticky sidebar
   ============================================================ */
.toc-sidebar {
    display: none;
}
@media (min-width: 1024px) {
    .toc-sidebar {
        display: block;
    }
    .toc-sticky {
        position: sticky;
        top: 88px;
    }
}

.toc-card {
    background: var(--bg-alt);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: var(--space-lg);
}
.toc-card h4 {
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}
.toc-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.toc-list a {
    display: block;
    padding: 6px 12px;
    font-size: var(--text-sm);
    color: var(--text-secondary);
    border-radius: var(--radius-xs);
    border-left: 2px solid transparent;
    transition: all var(--duration) var(--ease);
    line-height: 1.4;
}
.toc-list a:hover {
    color: var(--primary);
    background: var(--primary-bg);
}
.toc-list a.active {
    color: var(--primary);
    border-left-color: var(--primary);
    background: var(--primary-bg);
    font-weight: 500;
}

/* Mobile TOC: inline, collapsible */
.toc-mobile {
    display: block;
    margin-bottom: var(--space-xl);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.toc-mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-alt);
    border: none;
    font-family: var(--font);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
}
.toc-mobile-toggle svg {
    width: 16px;
    height: 16px;
    transition: transform var(--duration) var(--ease);
}
.toc-mobile.open .toc-mobile-toggle svg {
    transform: rotate(180deg);
}
.toc-mobile-body {
    display: none;
    padding: var(--space-sm) var(--space-lg) var(--space-md);
}
.toc-mobile.open .toc-mobile-body {
    display: block;
}

@media (min-width: 1024px) {
    .toc-mobile { display: none; }
}

/* ============================================================
   9. WINNER BOX / QUICK VERDICT
   ============================================================ */
.verdict-box {
    position: relative;
    background: linear-gradient(135deg, var(--primary-bg) 0%, #f0f9ff 100%);
    border: 2px solid var(--primary);
    border-radius: var(--radius);
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
    overflow: hidden;
}
.verdict-box::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 120px;
    height: 120px;
    background: var(--primary);
    opacity: 0.05;
    border-radius: 0 0 0 100%;
}
.verdict-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary);
    color: white;
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    margin-bottom: var(--space-md);
}
.verdict-badge svg { width: 14px; height: 14px; }
.verdict-box h3 {
    font-size: var(--text-xl);
    font-weight: 700;
    margin-bottom: var(--space-sm);
}
.verdict-box p {
    color: var(--text-secondary);
    font-size: var(--text-md);
    line-height: var(--leading-normal);
    margin-bottom: var(--space-md);
}
.verdict-winner {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: var(--space-md) var(--space-lg);
}
.verdict-winner-score {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--success);
    color: white;
    font-weight: 800;
    font-size: var(--text-xl);
    flex-shrink: 0;
}
.verdict-winner-info { flex: 1; }
.verdict-winner-info strong { font-size: var(--text-lg); display: block; }
.verdict-winner-info span { font-size: var(--text-sm); color: var(--text-secondary); }
.verdict-winner .btn { flex-shrink: 0; }

/* ============================================================
   10. COMPARISON TABLE
   ============================================================ */
.comparison-wrap {
    margin: var(--space-xl) 0;
}
.comparison-wrap h2 {
    font-size: var(--text-xl);
    font-weight: 700;
    margin-bottom: var(--space-md);
}

/* Desktop: horizontal scrollable table */
.comparison-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    position: relative;
}
/* Fade hint for scroll */
.comparison-scroll.has-overflow::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 40px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.9));
    pointer-events: none;
    border-radius: 0 var(--radius) var(--radius) 0;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm);
    min-width: 600px;
}
.comparison-table th,
.comparison-table td {
    padding: 14px var(--space-md);
    text-align: left;
    border-bottom: 1px solid var(--border-light);
    white-space: nowrap;
}
.comparison-table th {
    background: var(--bg-alt);
    font-weight: 600;
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    position: sticky;
    top: 0;
}
/* First column sticky on scroll */
.comparison-table th:first-child,
.comparison-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    background: var(--bg);
    font-weight: 600;
}
.comparison-table th:first-child {
    background: var(--bg-alt);
    z-index: 3;
}

.comparison-table td { vertical-align: middle; }

.comparison-table tbody tr:hover td {
    background: var(--primary-bg-subtle);
}
.comparison-table tbody tr.winner td {
    background: var(--success-bg);
}
.comparison-table tbody tr.winner td:first-child {
    background: var(--success-bg);
}

/* Winner crown badge */
.winner-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--success);
    color: white;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    margin-left: 8px;
    vertical-align: middle;
}

/* Feature check/cross in table */
.check { color: var(--success); font-weight: 700; }
.cross { color: var(--text-muted); }

/* Score pill in table */
.table-score {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 28px;
    padding: 0 10px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: var(--text-xs);
    color: white;
}
.table-score.excellent { background: var(--score-excellent); }
.table-score.good { background: var(--score-good); }
.table-score.average { background: var(--score-average); }
.table-score.poor { background: var(--score-poor); }

/* Mobile: card-based comparison */
.comparison-cards {
    display: none;
}

@media (max-width: 639px) {
    .comparison-scroll { display: none; }
    .comparison-cards { display: flex; flex-direction: column; gap: var(--space-md); }

    .compare-card {
        border: 1px solid var(--border);
        border-radius: var(--radius);
        overflow: hidden;
    }
    .compare-card.winner {
        border-color: var(--success);
        box-shadow: 0 0 0 1px var(--success);
    }
    .compare-card-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: var(--space-md) var(--space-lg);
        background: var(--bg-alt);
        border-bottom: 1px solid var(--border-light);
    }
    .compare-card.winner .compare-card-header {
        background: var(--success-bg);
    }
    .compare-card-header strong { font-size: var(--text-base); }
    .compare-card-rows {
        padding: var(--space-sm) 0;
    }
    .compare-card-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px var(--space-lg);
        font-size: var(--text-sm);
    }
    .compare-card-row:not(:last-child) {
        border-bottom: 1px solid var(--border-light);
    }
    .compare-card-label {
        color: var(--text-secondary);
        font-size: var(--text-xs);
        text-transform: uppercase;
        letter-spacing: 0.04em;
        font-weight: 500;
    }
    .compare-card-value {
        font-weight: 600;
        text-align: right;
    }
}

/* ============================================================
   11. PRODUCT RECOMMENDATION CARD
   ============================================================ */
.product-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-xl);
    margin: var(--space-xl) 0;
    transition: box-shadow var(--duration) var(--ease);
    position: relative;
}
.product-card:hover {
    box-shadow: var(--shadow-md);
}
.product-card.editor-pick {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
}
.product-card.editor-pick::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
    border-radius: var(--radius) var(--radius) 0 0;
}

/* Top row: name, badge, score */
.product-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}
.product-card-info { flex: 1; }
.product-card-name {
    font-size: var(--text-xl);
    font-weight: 700;
    line-height: var(--leading-snug);
    color: var(--text);
}
.product-card-bestfor {
    display: inline-block;
    margin-top: var(--space-xs);
    background: var(--primary-bg);
    color: var(--primary);
    font-size: var(--text-xs);
    font-weight: 600;
    padding: 3px 10px;
    border-radius: var(--radius-full);
}
.product-card-price {
    margin-top: var(--space-sm);
    font-size: var(--text-sm);
    color: var(--text-secondary);
}
.product-card-price strong {
    color: var(--text);
    font-size: var(--text-lg);
    font-weight: 700;
}

/* Score circle */
.score-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-weight: 800;
    font-size: var(--text-xl);
    color: white;
    flex-shrink: 0;
    position: relative;
}
.score-circle.excellent { background: var(--score-excellent); }
.score-circle.good { background: var(--score-good); }
.score-circle.average { background: var(--score-average); }
.score-circle.poor { background: var(--score-poor); }

.score-circle-label {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    text-align: center;
    margin-top: 4px;
}

/* Sub-scores (horizontal bars) */
.product-card-scores {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm) var(--space-lg);
    margin: var(--space-lg) 0;
    padding: var(--space-lg) 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}
.sub-score {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.sub-score-header {
    display: flex;
    justify-content: space-between;
    font-size: var(--text-xs);
    font-weight: 500;
}
.sub-score-label { color: var(--text-secondary); }
.sub-score-value { font-weight: 700; color: var(--text); }
.sub-score-bar {
    height: 6px;
    background: var(--border-light);
    border-radius: 3px;
    overflow: hidden;
}
.sub-score-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s var(--ease);
}
.sub-score-fill.excellent { background: var(--score-excellent); }
.sub-score-fill.good { background: var(--score-good); }
.sub-score-fill.average { background: var(--score-average); }
.sub-score-fill.poor { background: var(--score-poor); }

@media (max-width: 480px) {
    .product-card-scores { grid-template-columns: 1fr; }
}

/* Pros and cons */
.product-card-proscons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}
@media (max-width: 480px) {
    .product-card-proscons { grid-template-columns: 1fr; }
}

.pros-list, .cons-list {
    list-style: none;
}
.pros-list li, .cons-list li {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    font-size: var(--text-sm);
    line-height: 1.5;
    padding: 6px 0;
    color: var(--text-secondary);
}
.pros-list li::before {
    content: '';
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    border-radius: 50%;
    background: var(--success-bg);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 10px;
}
.cons-list li::before {
    content: '';
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    border-radius: 50%;
    background: var(--danger-bg);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23ef4444' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 6L6 18M6 6l12 12'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 10px;
}

.proscons-heading {
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: var(--space-sm);
}
.proscons-heading.pro { color: var(--success); }
.proscons-heading.con { color: var(--danger); }

/* CTA area */
.product-card-cta {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}
.product-card-cta .btn { flex: 1; min-width: 160px; }
.cta-note {
    font-size: var(--text-xs);
    color: var(--text-muted);
    font-style: italic;
}

/* ============================================================
   12. QUICK PICKS (Existing, enhanced)
   ============================================================ */
.quick-picks {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-lg);
    margin-bottom: var(--space-xl);
}
.quick-picks h2 {
    font-size: var(--text-xl);
    font-weight: 700;
    margin-bottom: var(--space-md);
}
.pick-row {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-sm);
    transition: all var(--duration) var(--ease);
}
.pick-row:hover { border-color: var(--border); box-shadow: var(--shadow-xs); }
.pick-row.pick-best { border-color: var(--primary); background: var(--primary-bg-subtle); }
.pick-rank { font-weight: 800; color: var(--primary); min-width: 32px; font-size: var(--text-lg); }
.pick-info { flex: 1; }
.pick-info strong { display: block; font-size: var(--text-base); }
.pick-commission { font-size: var(--text-sm); color: var(--success); font-weight: 600; }
.pick-rating { display: flex; gap: 2px; }
.star { width: 16px; height: 16px; display: inline-block; }
.star.filled { color: #f59e0b; }
.star::before { content: '\2605'; }
.picks-disclosure {
    margin-top: 12px;
    font-size: var(--text-xs);
    color: var(--text-muted);
    font-style: italic;
}

@media (max-width: 639px) {
    .pick-row {
        flex-wrap: wrap;
        gap: var(--space-sm);
    }
    .pick-row .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================================
   13. SCORE / RATING SYSTEM (Modern bars, not stars)
   ============================================================ */
.rating-block {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-xl);
    margin: var(--space-xl) 0;
}
.rating-header {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--border-light);
}
.rating-overall {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.rating-overall-score {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    font-weight: 800;
    font-size: var(--text-3xl);
    color: white;
}
.rating-overall-label {
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}
.rating-summary {
    flex: 1;
}
.rating-summary h3 { font-size: var(--text-lg); font-weight: 700; margin-bottom: 4px; }
.rating-summary p { font-size: var(--text-sm); color: var(--text-secondary); line-height: 1.5; }

.rating-breakdown {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}
.rating-row {
    display: grid;
    grid-template-columns: 100px 1fr 44px;
    align-items: center;
    gap: var(--space-md);
}
.rating-label {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-secondary);
}
.rating-bar {
    height: 8px;
    background: var(--border-light);
    border-radius: 4px;
    overflow: hidden;
}
.rating-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.8s var(--ease);
}
.rating-value {
    font-size: var(--text-sm);
    font-weight: 700;
    text-align: right;
}
.rating-bar-fill.excellent, .rating-overall-score.excellent { background: var(--score-excellent); }
.rating-bar-fill.good, .rating-overall-score.good { background: var(--score-good); }
.rating-bar-fill.average, .rating-overall-score.average { background: var(--score-average); }
.rating-bar-fill.poor, .rating-overall-score.poor { background: var(--score-poor); }

@media (max-width: 480px) {
    .rating-header { flex-direction: column; text-align: center; }
    .rating-row { grid-template-columns: 80px 1fr 36px; gap: var(--space-sm); }
}

/* ============================================================
   14. FAQ SECTION
   ============================================================ */
.faq-section {
    margin: var(--space-2xl) 0;
}
.faq-section h2 {
    font-size: var(--text-xl);
    font-weight: 700;
    margin-bottom: var(--space-lg);
}
.faq-item {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-sm);
    overflow: hidden;
    transition: border-color var(--duration) var(--ease);
}
.faq-item.open {
    border-color: var(--border);
}
.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    background: none;
    border: none;
    font-family: var(--font);
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    text-align: left;
    line-height: 1.4;
}
.faq-question:hover { color: var(--primary); }
.faq-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-alt);
    transition: transform var(--duration) var(--ease), background var(--duration) var(--ease);
}
.faq-item.open .faq-icon {
    transform: rotate(180deg);
    background: var(--primary-bg);
}
.faq-answer {
    display: none;
    padding: 0 var(--space-lg) var(--space-lg);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
}
.faq-item.open .faq-answer {
    display: block;
}

/* ============================================================
   15. BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: var(--text-sm);
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all var(--duration) var(--ease);
    white-space: nowrap;
    text-decoration: none;
    line-height: 1;
}
.btn-primary {
    background: var(--primary);
    color: white;
}
.btn-primary:hover {
    background: var(--primary-dark);
    color: white;
    box-shadow: var(--shadow-primary);
    transform: translateY(-1px);
}
.btn-outline {
    background: white;
    color: var(--primary);
    border: 1.5px solid var(--primary);
}
.btn-outline:hover {
    background: var(--primary);
    color: white;
}
.btn-success {
    background: var(--success);
    color: white;
}
.btn-success:hover {
    background: var(--success-dark);
    color: white;
}
.btn-lg {
    padding: 14px 32px;
    font-size: var(--text-base);
    border-radius: var(--radius);
}
.btn-full {
    width: 100%;
}

/* Touch-friendly: min 48px tap target on mobile */
@media (max-width: 768px) {
    .btn { min-height: 48px; padding: 14px 24px; font-size: var(--text-base); }
}

/* ============================================================
   16. ARTICLE CONTENT (body text, inline elements)
   ============================================================ */
.article-content {
    font-size: var(--text-md);
    line-height: var(--leading-relaxed);
    color: #1e293b;
    letter-spacing: -0.01em;
}
.article-content h2 {
    font-size: var(--text-2xl);
    font-weight: 700;
    margin: var(--space-2xl) 0 var(--space-md);
    scroll-margin-top: 80px;
}
.article-content h3 {
    font-size: var(--text-xl);
    font-weight: 600;
    margin: var(--space-xl) 0 var(--space-sm);
}
.article-content p { margin-bottom: var(--space-lg); }
.article-content > h1 { font-size: 2rem; font-weight: 800; margin-bottom: var(--space-lg); line-height: var(--leading-tight); }
.article-content ul, .article-content ol { margin: 0 0 var(--space-lg) var(--space-lg); }
.article-content li { margin-bottom: 10px; line-height: 1.7; }
.article-content li strong { color: var(--primary); }
.article-content a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: rgba(99,102,241,0.3); }
.article-content a:hover { text-decoration-color: var(--primary); }
.article-content blockquote {
    border-left: 3px solid var(--primary);
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-alt);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin: var(--space-lg) 0;
    font-style: italic;
    color: var(--text-secondary);
}
.article-content img { border-radius: var(--radius-sm); margin: var(--space-lg) 0; width: 100%; height: auto; }

/* Tables within content */
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--space-xl) 0;
    font-size: var(--text-sm);
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.article-content th, .article-content td {
    padding: 14px var(--space-md);
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}
.article-content th {
    font-weight: 700;
    background: var(--primary);
    color: white;
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.article-content tr:nth-child(even) { background: var(--bg-alt); }
.article-content tr:hover { background: var(--primary-bg-subtle); }
.article-content code { background: var(--bg-alt); padding: 2px 6px; border-radius: 4px; font-size: 0.9em; }
.article-content pre { background: #1e293b; color: #e2e8f0; padding: var(--space-lg); border-radius: var(--radius-sm); overflow-x: auto; margin: var(--space-lg) 0; }
.article-content pre code { background: none; padding: 0; color: inherit; }

/* AI-generated content blocks */
.article-content > div[style*="background"] { border-radius: var(--radius) !important; margin: var(--space-xl) 0 !important; font-size: 0.95rem; }
.article-content > div[style*="background"] h2,
.article-content > div[style*="background"] h3 { font-size: var(--text-lg); margin-top: 0; margin-bottom: 12px; }
.article-content > div[style*="background"] ul { margin-left: var(--space-md); }
.article-content > div[style*="background"] li { margin-bottom: 6px; }

/* Override inline table styles */
.article-content table[style] { box-shadow: var(--shadow) !important; border-radius: var(--radius-sm) !important; overflow: hidden !important; }
.article-content thead tr[style] { background: var(--primary) !important; color: white !important; }
.article-content thead th[style] { background: transparent !important; color: white !important; border-color: rgba(255,255,255,0.15) !important; font-size: var(--text-xs) !important; }
.article-content tbody td[style] { border-color: var(--border-light) !important; padding: 12px 14px !important; }
.article-content tbody tr:hover td { background: var(--primary-bg-subtle) !important; }

/* Affiliate CTA buttons in content */
.article-content a[href*="/go/"].btn,
.article-content a.btn {
    display: inline-flex;
    background: var(--primary);
    color: white !important;
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all var(--duration) var(--ease);
    margin: var(--space-sm) 0;
}
.article-content a[href*="/go/"].btn:hover,
.article-content a.btn:hover { background: var(--primary-dark); box-shadow: var(--shadow-primary); }
.article-content .btn { margin: var(--space-sm) var(--space-xs) var(--space-sm) 0; }
.article-content a.btn { text-decoration: none; }
.article-content a[href*="/go/"] { color: var(--primary); font-weight: 600; }
.article-content a[href*="/go/"]:not(.btn) { text-decoration: underline; text-underline-offset: 2px; }

/* Author Box */
.author-box {
    display: flex;
    gap: var(--space-lg);
    align-items: center;
    padding: var(--space-xl);
    margin-top: var(--space-2xl);
    background: var(--bg-alt);
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
}
.author-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.author-name {
    font-size: var(--text-base);
    color: var(--text);
    display: block;
    margin-bottom: 4px;
}
.author-bio {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* ============================================================
   17. BOTTOM CTA
   ============================================================ */
.bottom-cta {
    margin-top: var(--space-2xl);
    padding: var(--space-xl);
    background: linear-gradient(135deg, var(--primary-bg) 0%, #f0f9ff 100%);
    border-radius: var(--radius);
    text-align: center;
}
.bottom-cta h3 { font-size: var(--text-xl); margin-bottom: var(--space-md); }
.cta-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

@media (max-width: 480px) {
    .cta-buttons { flex-direction: column; }
}

/* ============================================================
   18. CATEGORY PAGE
   ============================================================ */
.category-page { padding: var(--space-2xl) 0 var(--space-4xl); }
.category-header { margin-bottom: var(--space-xl); }
.category-header h1 { font-size: 2rem; font-weight: 800; }
.category-header p { margin-top: var(--space-sm); color: var(--text-secondary); font-size: var(--text-md); }

/* ============================================================
   19. PAGINATION
   ============================================================ */
.pagination { display: flex; gap: var(--space-sm); justify-content: center; margin-top: var(--space-2xl); }
.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    transition: all var(--duration) var(--ease);
}
.page-link:hover { border-color: var(--primary); color: var(--primary); }
.page-link.active { background: var(--primary); color: white; border-color: var(--primary); }

/* ============================================================
   20. ERROR & EMPTY STATES
   ============================================================ */
.error-page { padding: 120px 0; text-align: center; }
.error-page h1 { font-size: 6rem; font-weight: 800; color: var(--border); }
.error-page p { margin: var(--space-md) 0 var(--space-xl); color: var(--text-secondary); font-size: var(--text-lg); }
.empty-state { padding: var(--space-4xl) 0; text-align: center; color: var(--text-muted); }

/* ============================================================
   20b. NEWSLETTER SUBSCRIBE
   ============================================================ */
.newsletter-section {
    background: linear-gradient(135deg, #eef2ff 0%, #f5f7ff 100%);
    padding: var(--space-3xl) 0;
    margin-top: var(--space-4xl);
    border-top: 1px solid var(--border);
}
.newsletter-box {
    max-width: 560px;
    margin: 0 auto;
    text-align: center;
}
.newsletter-text h2 {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--text);
    margin: 0 0 8px;
}
.newsletter-text p {
    font-size: var(--text-base);
    color: var(--text-secondary);
    margin: 0 0 24px;
}
.newsletter-input-group {
    display: flex;
    gap: 8px;
    max-width: 440px;
    margin: 0 auto;
}
.newsletter-input {
    flex: 1;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    background: #fff;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s;
}
.newsletter-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}
.newsletter-btn {
    padding: 14px 24px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}
.newsletter-btn:hover {
    background: var(--primary-dark);
}
.newsletter-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.newsletter-msg {
    margin: 12px 0 0;
    font-size: var(--text-sm);
    min-height: 20px;
}
.newsletter-msg.success { color: var(--success-dark); }
.newsletter-msg.error { color: var(--danger); }
.newsletter-privacy {
    margin: 8px 0 0;
    font-size: var(--text-xs);
    color: var(--text-muted);
}
.newsletter-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--success);
    color: #fff;
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    z-index: 9999;
    display: flex;
    align-items: center;
    animation: slideUp 0.3s ease;
}
@keyframes slideUp {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@media (max-width: 768px) {
    .newsletter-input-group { flex-direction: column; }
    .newsletter-btn { width: 100%; }
    .newsletter-section { padding: var(--space-2xl) 0; }
}

/* ============================================================
   21. FOOTER
   ============================================================ */
.site-footer { background: #0f172a; color: #94a3b8; padding: var(--space-3xl) 0 var(--space-xl); margin-top: var(--space-4xl); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--space-2xl); }
.footer-about .logo-text { color: white; font-size: var(--text-xl); font-weight: 700; display: block; margin-bottom: 12px; }
.footer-about p { font-size: var(--text-sm); line-height: var(--leading-normal); }
.footer-links h4 { color: white; font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 12px; }
.footer-links a { display: block; padding: 4px 0; font-size: var(--text-sm); color: #94a3b8; }
.footer-links a:hover { color: white; }
.footer-bottom {
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid #1e293b;
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
}
.affiliate-disclosure { font-style: italic; opacity: 0.7; }

@media (max-width: 768px) {
    .footer-grid { grid-template-columns: 1fr; gap: var(--space-xl); }
    .footer-bottom { flex-direction: column; gap: var(--space-sm); }
}

/* ============================================================
   22. MOBILE-SPECIFIC TYPOGRAPHY
   ============================================================ */
@media (max-width: 768px) {
    .hero h1 { font-size: var(--text-3xl); }
    .hero-sub { font-size: var(--text-base); }
    .article-header h1 { font-size: var(--text-2xl); }
    .article-content { font-size: var(--text-base); line-height: 1.75; }
    .article-content h2 { font-size: var(--text-xl); }
    .article-content h3 { font-size: var(--text-lg); }
    .container { padding: 0 var(--space-md); }
    .container-narrow { padding: 0 var(--space-md); }
    .product-card { padding: var(--space-lg); }
    .product-card-top { flex-direction: column; }
    .score-circle { align-self: flex-start; }
    .verdict-winner { flex-direction: column; text-align: center; }
    .verdict-winner .btn { width: 100%; }
}

@media (max-width: 480px) {
    .hero { padding: var(--space-2xl) 0; }
    .hero h1 { font-size: var(--text-2xl); }
    .container { padding: 0 var(--space-md); }
}

/* ============================================================
   23. UTILITY CLASSES
   ============================================================ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}
/* ============================================================
   24. MERMAID DIAGRAMS — Infographic-grade styling
   ============================================================ */

/* --- Container wrapper --- */
.article-content .diagram-block {
    position: relative;
    margin: var(--space-2xl) 0;
    padding: 0;
}

/* --- Label/title above diagram --- */
.article-content .diagram-block .diagram-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary);
    background: var(--primary-bg);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    margin-bottom: var(--space-md);
}

.article-content .diagram-block .diagram-label svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.article-content .diagram-block .diagram-title {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text);
    margin: 0 0 var(--space-lg) 0;
    line-height: var(--leading-snug);
}

/* --- The Mermaid container itself --- */
.article-content .mermaid {
    background: linear-gradient(145deg, #fafbff 0%, #eef0ff 40%, #f5f3ff 70%, #f8fafc 100%);
    border: 1.5px solid rgba(99, 102, 241, 0.15);
    border-radius: 16px;
    padding: 48px 40px 40px;
    box-shadow:
        0 1px 2px rgba(99, 102, 241, 0.04),
        0 4px 16px rgba(99, 102, 241, 0.07),
        0 12px 40px rgba(99, 102, 241, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    text-align: center;
    transition: box-shadow 0.35s var(--ease), border-color 0.35s var(--ease), transform 0.35s var(--ease);
    position: relative;
}

/* Decorative top accent bar */
.article-content .mermaid::before {
    content: '';
    position: absolute;
    top: 0;
    left: 24px;
    right: 24px;
    height: 3px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #06b6d4, #10b981);
    border-radius: 0 0 3px 3px;
}

.article-content .mermaid:hover {
    border-color: rgba(99, 102, 241, 0.25);
    box-shadow:
        0 2px 4px rgba(99, 102, 241, 0.06),
        0 8px 24px rgba(99, 102, 241, 0.1),
        0 16px 48px rgba(99, 102, 241, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transform: translateY(-1px);
}

/* --- SVG inside Mermaid --- */
.article-content .mermaid svg {
    max-width: 100%;
    height: auto !important;
    margin: 0 auto;
    display: block;
    border-radius: 0;
}

/* --- Mermaid text overrides (Inter font everywhere) --- */
.article-content .mermaid .nodeLabel,
.article-content .mermaid .edgeLabel,
.article-content .mermaid .labelText,
.article-content .mermaid text,
.article-content .mermaid .messageText,
.article-content .mermaid .noteText,
.article-content .mermaid .loopText,
.article-content .mermaid .labelBox,
.article-content .mermaid .cluster-label {
    font-family: var(--font) !important;
}

/* ---- FLOWCHART NODE STYLING ---- */

/* All node shapes: rounded, padded */
.article-content .mermaid .node rect,
.article-content .mermaid .node polygon,
.article-content .mermaid .node circle,
.article-content .mermaid .node ellipse {
    rx: 10 !important;
    ry: 10 !important;
    stroke-width: 2px !important;
    transition: filter 0.25s ease;
}

/* Node labels: larger, bolder, better spacing */
.article-content .mermaid .nodeLabel {
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.5 !important;
    letter-spacing: -0.01em !important;
}

/* ---- EDGE / LINE STYLING ---- */

/* Thicker, more visible edges */
.article-content .mermaid .edgePath path.path,
.article-content .mermaid .flowchart-link {
    stroke-width: 2.5px !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
}

/* Arrowhead markers: slightly larger */
.article-content .mermaid marker path {
    stroke-width: 1px !important;
}

/* Edge labels: pill-shaped badge */
.article-content .mermaid .edgeLabel {
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em !important;
}

.article-content .mermaid .edgeLabel rect {
    rx: 10 !important;
    ry: 10 !important;
    stroke: rgba(99, 102, 241, 0.2) !important;
    stroke-width: 1px !important;
    fill: #ffffff !important;
}

/* ---- SUBGRAPH / CLUSTER STYLING ---- */

/* Visible, tinted subgraph backgrounds */
.article-content .mermaid .cluster rect {
    rx: 14 !important;
    ry: 14 !important;
    fill: #f1f5f9 !important;
    stroke: #e2e8f0 !important;
    stroke-width: 1.5px !important;
    stroke-dasharray: none !important;
}

/* Subgraph titles */
.article-content .mermaid .cluster-label .nodeLabel {
    font-size: 13px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    fill: #64748b !important;
    color: #64748b !important;
}

/* ---- SEQUENCE DIAGRAM ENHANCEMENTS ---- */

/* Participant boxes: bold, rounded */
.article-content .mermaid .actor {
    rx: 10 !important;
    ry: 10 !important;
    stroke-width: 2px !important;
}

/* Sequence messages */
.article-content .mermaid .messageText {
    font-size: 13px !important;
    font-weight: 600 !important;
}

/* Sequence lines */
.article-content .mermaid .messageLine0,
.article-content .mermaid .messageLine1 {
    stroke-width: 2px !important;
}

/* Notes in sequence diagrams */
.article-content .mermaid .noteText {
    font-size: 12px !important;
    font-weight: 500 !important;
}

.article-content .mermaid .note rect {
    rx: 8 !important;
    ry: 8 !important;
}

/* ---- HOVER EFFECTS (securityLevel: loose) ---- */

.article-content .mermaid .node {
    cursor: pointer;
}

.article-content .mermaid .node:hover rect,
.article-content .mermaid .node:hover polygon,
.article-content .mermaid .node:hover circle,
.article-content .mermaid .node:hover ellipse {
    filter: brightness(1.05) !important;
}

.article-content .mermaid .node:hover .nodeLabel {
    filter: brightness(0.95);
}

/* ---- SEMANTIC COLOR CLASSES (apply via Mermaid classDef) ---- */

/* Use in Mermaid code: classDef good fill:#d1fae5,stroke:#10b981,color:#065f46 */
/* Use in Mermaid code: classDef bad fill:#ffe4e6,stroke:#f43f5e,color:#881337 */
/* Use in Mermaid code: classDef warn fill:#fef3c7,stroke:#f59e0b,color:#78350f */
/* Use in Mermaid code: classDef info fill:#e0f2fe,stroke:#0ea5e9,color:#0c4a6e */
/* Use in Mermaid code: classDef hero fill:#6366f1,stroke:#4338ca,color:#ffffff */

/* --- Caption under diagram --- */
.article-content .diagram-block .diagram-caption {
    margin-top: var(--space-md);
    font-size: var(--text-sm);
    color: var(--text-muted);
    text-align: center;
    font-style: italic;
    line-height: var(--leading-normal);
}

/* --- Fade-in animation --- */
.article-content .diagram-block {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.article-content .diagram-block.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* No-JS fallback */
.no-js .article-content .diagram-block {
    opacity: 1;
    transform: none;
}

/* --- Mobile scroll hint --- */
.mermaid-scroll-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--text-muted);
    padding: 8px 0 0;
    animation: bc-hint-pulse 1.5s ease-in-out infinite;
}

@keyframes bc-hint-pulse {
    0%, 100% { opacity: 0.6; transform: translateX(0); }
    50% { opacity: 1; transform: translateX(4px); }
}

/* --- Scrollbar styling --- */
.article-content .mermaid::-webkit-scrollbar {
    height: 6px;
}

.article-content .mermaid::-webkit-scrollbar-track {
    background: rgba(99, 102, 241, 0.04);
    border-radius: 3px;
}

.article-content .mermaid::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.18);
    border-radius: 3px;
}

.article-content .mermaid::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.35);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .article-content .mermaid {
        padding: 32px 20px 24px;
        border-radius: 12px;
        margin-left: calc(-1 * var(--space-md));
        margin-right: calc(-1 * var(--space-md));
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .article-content .mermaid::before {
        left: 0;
        right: 0;
        border-radius: 0;
    }

    .article-content .diagram-block {
        margin: var(--space-xl) 0;
    }

    .article-content .diagram-block .diagram-title {
        font-size: var(--text-base);
    }

    .article-content .mermaid .nodeLabel {
        font-size: 12px !important;
    }

    .article-content .mermaid .messageText {
        font-size: 11px !important;
    }

    .article-content .mermaid .edgeLabel {
        font-size: 10px !important;
    }

    .article-content .mermaid svg {
        min-width: 500px;
    }
}

@media (max-width: 480px) {
    .article-content .mermaid {
        padding: 28px 14px 20px;
    }

    .article-content .mermaid svg {
        min-width: 420px;
    }
}

/* --- Print --- */
@media print {
    .article-content .diagram-block {
        opacity: 1;
        transform: none;
        break-inside: avoid;
    }
    .article-content .mermaid {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    .article-content .mermaid::before {
        display: none;
    }
}

/* ============================================================
   25. MOBILE TABLE -> STACKED LABELS (no horizontal scroll ever)
   ============================================================ */
@media (max-width: 768px) {
    /* Kill ALL horizontal scroll on the page */
    html, body { overflow-x: hidden !important; }

    /* Transform any table in article content to stacked cards */
    .article-content table,
    .article-content table[style] {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        overflow: visible !important;
        border: none !important;
        box-shadow: none !important;
    }
    .article-content thead { display: none !important; }
    .article-content tbody { display: block !important; }
    .article-content tr,
    .article-content tr[style] {
        display: block !important;
        background: white !important;
        border: 1px solid var(--border) !important;
        border-radius: 12px !important;
        padding: 16px !important;
        margin-bottom: 12px !important;
    }
    .article-content tr.winner,
    .article-content tr:first-child {
        border-color: var(--success) !important;
        border-width: 2px !important;
    }
    .article-content td,
    .article-content td[style] {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 8px 0 !important;
        border: none !important;
        border-bottom: 1px solid var(--border-light) !important;
        font-size: 0.9rem !important;
        background: transparent !important;
        width: 100% !important;
    }
    .article-content td:last-child {
        border-bottom: none !important;
        padding-top: 12px !important;
    }
    /* Use thead labels as data-label via CSS */
    .article-content td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-secondary);
        font-size: 0.8rem;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        flex-shrink: 0;
        margin-right: 12px;
    }
    .article-content td:first-child {
        font-weight: 700;
        font-size: 1rem !important;
        display: block !important;
        padding-bottom: 4px !important;
        border-bottom: none !important;
    }
    .article-content td:first-child::before { display: none; }

    /* Comparison table wrapper — no scroll */
    .comparison-scroll,
    .comparison-scroll[style],
    .table-wrapper,
    div[style*="overflow-x"],
    div[style*="overflow:auto"] {
        overflow: visible !important;
        overflow-x: visible !important;
    }
    .comparison-scroll::after { display: none !important; }
    .comparison-table { min-width: 0 !important; }

    /* Inline styled tables from AI content */
    .article-content div[style*="overflow"] {
        overflow: visible !important;
        overflow-x: visible !important;
    }
    .article-content table th[style],
    .article-content table td[style] {
        width: auto !important;
        min-width: 0 !important;
    }

    /* Product card header - stack on mobile */
    .article-content > div[style*="border-top:4px"] > div[style*="display:flex"] {
        flex-wrap: wrap !important;
    }
    .article-content > div[style*="border-top:4px"] > div[style*="display:flex"] > div[style*="margin-left:auto"] {
        margin-left: 0 !important;
        margin-top: 8px !important;
    }

    /* CTA buttons stack on mobile */
    .article-content > div[style*="border-top:4px"] > div[style*="display:flex"]:last-child {
        flex-direction: column !important;
    }
    .article-content > div[style*="border-top:4px"] > div[style*="display:flex"]:last-child > a {
        text-align: center !important;
    }

    /* Make sure CTA buttons are full width on mobile */
    .article-content .btn,
    .article-content a.btn,
    .article-content a[href*="/go/"].btn {
        display: block !important;
        width: 100% !important;
        text-align: center !important;
        padding: 14px 20px !important;
        font-size: 1rem !important;
    }

    /* Pros/Cons stacked on mobile */
    .proscons,
    .verdict-box__proscons,
    div[style*="grid-template-columns: 1fr 1fr"],
    div[style*="grid-template-columns:1fr 1fr"] {
        grid-template-columns: 1fr !important;
        display: block !important;
    }
}

/* Filter pills */
.filter-pill {
    padding: 8px 18px;
    border-radius: 24px;
    border: 1px solid var(--border);
    background: white;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    color: var(--text-secondary);
}
.filter-pill:hover { border-color: var(--primary); color: var(--primary); }
.filter-pill.active { background: var(--primary); color: white; border-color: var(--primary); }
.sub-section { margin-bottom: 40px; }

.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-primary { color: var(--primary); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* ============================================================
   25. SOFTWARE DIRECTORY PAGE
   ============================================================ */
.software-hero { background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%); }

.software-stats {
    display: flex;
    gap: var(--space-xl);
    justify-content: center;
    margin-top: var(--space-xl);
}
.stat-item { text-align: center; }
.stat-number {
    display: block;
    font-size: var(--text-3xl);
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}
.stat-label {
    font-size: var(--text-xs);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

/* Filter pills */
.software-filter {
    padding: var(--space-lg) 0;
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 64px;
    z-index: 50;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.filter-pills {
    display: flex;
    gap: var(--space-sm);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
}
.filter-pills::-webkit-scrollbar { display: none; }
.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-family: var(--font);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-secondary);
    background: white;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--duration) var(--ease);
}
.filter-pill:hover { border-color: var(--primary); color: var(--primary); }
.filter-pill.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}
.pill-count {
    font-size: var(--text-xs);
    opacity: 0.7;
}

/* Category section header */
.software-category {
    padding: var(--space-2xl) 0;
    border-bottom: 1px solid var(--border-light);
}
.software-category:last-of-type { border-bottom: none; }
.category-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}
.category-section-header h2 {
    font-size: var(--text-2xl);
    font-weight: 700;
}
.category-desc {
    margin-top: 4px;
    color: var(--text-secondary);
    font-size: var(--text-sm);
}
.view-all-link {
    font-size: var(--text-sm);
    font-weight: 600;
    white-space: nowrap;
    color: var(--primary);
}

/* Category products section (on category page) */
.category-products-section {
    margin-bottom: var(--space-2xl);
    padding-bottom: var(--space-2xl);
    border-bottom: 1px solid var(--border-light);
}

/* ============================================================
   26. PRODUCT GRID & MINI CARDS
   ============================================================ */
.product-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
    max-width: 960px;
}
@media (min-width: 640px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
    .product-grid { grid-template-columns: repeat(3, 1fr); }
}

.product-card-mini {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0;
    transition: all var(--duration) var(--ease);
    position: relative;
    overflow: hidden;
}
.product-card-mini:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.pcm-top {
    height: 3px;
    background: var(--border-light);
    border-color: var(--primary);
    background: var(--border-light);
}
.pcm-top[style] {
    background: none;
    border-top: 3px solid;
}
.pcm-rank {
    position: absolute;
    top: 10px;
    left: 12px;
    font-size: var(--text-xs);
    font-weight: 800;
    color: var(--text-muted);
    z-index: 2;
}
.pcm-rank.rank-1 { color: #f59e0b; }
.pcm-rank.rank-2 { color: #94a3b8; }
.pcm-rank.rank-3 { color: #cd7f32; }

.pcm-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-md) 0;
}
.pcm-logo {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}
.pcm-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.pcm-score {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 32px;
    padding: 0 10px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: var(--text-sm);
    color: white;
}
.pcm-score.excellent { background: var(--score-excellent); }
.pcm-score.good { background: var(--score-good); }
.pcm-score.average { background: var(--score-average); }
.pcm-score.poor { background: var(--score-poor); }

.pcm-name {
    padding: var(--space-sm) var(--space-md) 0;
    font-size: var(--text-base);
    font-weight: 700;
    line-height: var(--leading-snug);
}
.pcm-tagline {
    padding: 2px var(--space-md) 0;
    font-size: var(--text-xs);
    color: var(--text-secondary);
    line-height: 1.4;
}

.pcm-meta {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md) 0;
    flex-wrap: wrap;
}
.pcm-price {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    font-weight: 500;
}
.pcm-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.badge-free { background: var(--success-bg); color: var(--success-dark); }
.badge-trial { background: var(--primary-bg); color: var(--primary); }
.badge-deal { background: var(--warning-bg); color: #b45309; }

.pcm-link {
    display: block;
    padding: var(--space-md);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--primary);
    text-align: center;
    border-top: 1px solid var(--border-light);
    margin-top: var(--space-md);
    transition: background var(--duration) var(--ease);
}
.pcm-link:hover {
    background: var(--primary-bg);
    color: var(--primary-dark);
}

/* ============================================================
   27. DEALS PAGE
   ============================================================ */
.deals-section {
    padding: var(--space-2xl) 0 var(--space-4xl);
}

.deals-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
    max-width: 960px;
}
@media (min-width: 640px) {
    .deals-grid { grid-template-columns: repeat(2, 1fr); }
}

.deal-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-lg);
    transition: all var(--duration) var(--ease);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}
.deal-card:hover {
    box-shadow: var(--shadow-md);
}

.deal-card-top {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}
.deal-card-logo {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}
.deal-card-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.deal-card-info { flex: 1; }
.deal-card-info h3 {
    font-size: var(--text-base);
    font-weight: 700;
}
.deal-category {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.deal-badge {
    display: inline-flex;
    padding: 4px 12px;
    background: var(--success);
    color: white;
    font-size: var(--text-xs);
    font-weight: 700;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.deal-card-desc {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Coupon code display */
.deal-code-wrap {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    background: var(--bg-alt);
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    padding: var(--space-sm) var(--space-md);
}
.coupon-code {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.05em;
}

.copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-xs);
    font-family: var(--font);
    font-size: var(--text-xs);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--duration) var(--ease);
    white-space: nowrap;
}
.copy-btn:hover {
    background: var(--primary-dark);
}

.deal-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    flex-wrap: wrap;
}
.deal-expires {
    font-size: var(--text-xs);
    color: var(--text-muted);
}
.deal-review-link {
    display: block;
    font-size: var(--text-xs);
    font-weight: 500;
    color: var(--text-muted);
    text-align: center;
    padding-top: var(--space-sm);
    border-top: 1px solid var(--border-light);
}
.deal-review-link:hover { color: var(--primary); }

.btn-sm {
    padding: 8px 16px;
    font-size: var(--text-xs);
}

/* ============================================================
   28. PRODUCT REVIEW PAGE
   ============================================================ */
.product-review-page {
    padding-bottom: var(--space-4xl);
}
.product-review-page .breadcrumb {
    padding-top: var(--space-lg);
}

/* Hero with brand color accent */
.product-hero {
    padding: var(--space-xl) 0;
    border-bottom: 3px solid var(--brand, var(--primary));
    margin-bottom: var(--space-xl);
}
.product-hero-inner {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}
.product-hero-logo {
    width: 64px;
    height: 64px;
    border-radius: var(--radius);
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid var(--border-light);
}
.product-hero-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.product-hero-info { flex: 1; }
.product-hero-info h1 {
    font-size: var(--text-3xl);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: var(--leading-tight);
}
.product-hero-tagline {
    margin-top: 4px;
    font-size: var(--text-md);
    color: var(--text-secondary);
}
.product-hero-score {
    text-align: center;
    flex-shrink: 0;
}

/* Quick info bar */
.product-quick-info {
    padding: var(--space-md) 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border-light);
    margin-bottom: var(--space-2xl);
}
.quick-info-items {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
    flex-wrap: wrap;
}
.quick-info-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.qi-label {
    font-size: var(--text-xs);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 500;
}
.qi-value {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text);
}
.qi-score.excellent { color: var(--score-excellent); }
.qi-score.good { color: var(--score-good); }
.qi-score.average { color: var(--score-average); }
.qi-score.poor { color: var(--score-poor); }

/* Score breakdown */
.score-breakdown {
    margin-bottom: var(--space-2xl);
}
.score-breakdown h2 {
    font-size: var(--text-xl);
    font-weight: 700;
    margin-bottom: var(--space-lg);
}
.score-breakdown-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    background: var(--bg-alt);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: var(--space-lg);
}
.score-bar-row {
    display: grid;
    grid-template-columns: 120px 1fr 44px;
    align-items: center;
    gap: var(--space-md);
}
.score-bar-label {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-secondary);
}
.score-bar {
    height: 8px;
    background: var(--border-light);
    border-radius: 4px;
    overflow: hidden;
}
.score-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.8s var(--ease);
}
.score-bar-fill.excellent { background: var(--score-excellent); }
.score-bar-fill.good { background: var(--score-good); }
.score-bar-fill.average { background: var(--score-average); }
.score-bar-fill.poor { background: var(--score-poor); }
.score-bar-value {
    font-size: var(--text-sm);
    font-weight: 700;
    text-align: right;
}

/* Pros/cons section heading */
.proscons-section {
    margin-bottom: var(--space-2xl);
}
.proscons-section h2 {
    font-size: var(--text-xl);
    font-weight: 700;
    margin-bottom: var(--space-lg);
}

/* About section */
.product-about {
    margin-bottom: var(--space-2xl);
}
.product-about h2 {
    font-size: var(--text-xl);
    font-weight: 700;
    margin-bottom: var(--space-md);
}

/* Features grid */
.product-features {
    margin-bottom: var(--space-2xl);
}
.product-features h2 {
    font-size: var(--text-xl);
    font-weight: 700;
    margin-bottom: var(--space-lg);
}
.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-sm);
}
@media (min-width: 640px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); }
}
.feature-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.5;
}
.feature-item svg {
    flex-shrink: 0;
    color: var(--success);
    margin-top: 1px;
}

/* Pricing section */
.product-pricing {
    margin-bottom: var(--space-2xl);
}
.product-pricing h2 {
    font-size: var(--text-xl);
    font-weight: 700;
    margin-bottom: var(--space-md);
}

/* Deal highlight box */
.deal-highlight {
    background: linear-gradient(135deg, var(--success-bg) 0%, #f0fdf4 100%);
    border: 2px solid var(--success);
    border-radius: var(--radius);
    padding: var(--space-xl);
    margin-bottom: var(--space-2xl);
}
.deal-highlight-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
    flex-wrap: wrap;
}
.deal-highlight-info { flex: 1; }
.deal-highlight-info h3 {
    font-size: var(--text-lg);
    font-weight: 700;
    margin-bottom: 4px;
}
.deal-highlight-info p {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.5;
}
.deal-discount {
    display: inline-block;
    background: var(--success);
    color: white;
    font-size: var(--text-sm);
    font-weight: 700;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    margin-bottom: var(--space-sm);
}
.deal-highlight-code {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    background: white;
    border: 1px dashed var(--success);
    border-radius: var(--radius-sm);
    padding: var(--space-sm) var(--space-md);
}

/* CTA section */
.product-cta {
    margin-bottom: var(--space-2xl);
}

/* Related sections */
.related-products,
.related-articles {
    margin-top: var(--space-2xl);
    padding-top: var(--space-2xl);
    border-top: 1px solid var(--border-light);
}
.related-products h2,
.related-articles h2 {
    font-size: var(--text-xl);
    font-weight: 700;
    margin-bottom: var(--space-lg);
}

/* ============================================================
   29. PRODUCT REVIEW PAGE (sidebar layout)
   ============================================================ */

/* Review hero */
.review-hero {
    padding: var(--space-xl) 0 var(--space-2xl);
    border-bottom: 3px solid var(--brand, var(--primary));
    background: linear-gradient(180deg, var(--bg-alt) 0%, var(--bg) 100%);
}
.review-hero-inner {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: var(--space-2xl);
    align-items: start;
}
.review-hero-left .breadcrumb { margin-bottom: var(--space-lg); }
.review-title-row {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    margin-bottom: var(--space-md);
}
.review-logo {
    width: 64px;
    height: 64px;
    border-radius: var(--radius);
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid var(--border-light);
    background: white;
}
.review-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.review-title-row h1 {
    font-size: var(--text-3xl);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: var(--leading-tight);
}
.review-tagline {
    font-size: var(--text-md);
    color: var(--text-secondary);
    margin-top: 4px;
}
.review-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}
.review-price {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-secondary);
}
.product-badge {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 600;
}

/* Score card in hero */
.review-score-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-lg);
    text-align: center;
}
.score-big {
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--border-light);
}
.score-number {
    display: block;
    font-size: 3rem;
    font-weight: 800;
    color: var(--score-color, var(--primary));
    line-height: 1;
}
.score-label {
    display: block;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-secondary);
    margin-top: 4px;
}
.sub-scores {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}
.sub-score-row {
    display: grid;
    grid-template-columns: 80px 1fr 36px;
    align-items: center;
    gap: var(--space-sm);
    text-align: left;
}
.sub-score-row .sub-score-label {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    font-weight: 500;
}
.sub-score-row .sub-score-bar {
    height: 6px;
    background: var(--border-light);
    border-radius: 3px;
    overflow: hidden;
}
.sub-score-row .sub-score-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s var(--ease);
}
.sub-score-row .sub-score-value {
    font-size: var(--text-xs);
    font-weight: 700;
    text-align: right;
}

/* Review content layout with sidebar */
.review-content-wrap {
    padding: var(--space-2xl) 0 var(--space-4xl);
}
.review-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    max-width: var(--max-width);
}
@media (min-width: 1024px) {
    .review-layout {
        grid-template-columns: 1fr 280px;
    }
}

.review-main {
    min-width: 0;
}

/* Review sections */
.review-section {
    margin-bottom: var(--space-2xl);
}
.review-section h2 {
    font-size: var(--text-xl);
    font-weight: 700;
    margin-bottom: var(--space-md);
}
.review-text {
    font-size: var(--text-md);
    line-height: var(--leading-relaxed);
    color: var(--text-secondary);
}

/* Pros/cons grid in review */
.pros-cons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
}
@media (max-width: 640px) {
    .pros-cons-grid { grid-template-columns: 1fr; }
}
.pros-cons-grid h3 {
    font-size: var(--text-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: var(--space-sm);
}
.pros-cons-grid .pros-list h3 { color: var(--success); }
.pros-cons-grid .cons-list h3 { color: var(--danger); }
.pros-cons-grid ul { list-style: none; }
.pros-cons-grid li {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    padding: 6px 0;
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.5;
}
.icon-check::before {
    content: '';
    display: inline-block;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--success-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") no-repeat center / 10px;
}
.icon-x::before {
    content: '';
    display: inline-block;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--danger-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23ef4444' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 6L6 18M6 6l12 12'/%3E%3C/svg%3E") no-repeat center / 10px;
}

/* Feature check icon */
.feature-check::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--success-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") no-repeat center / 10px;
}

/* Pricing info rows */
.pricing-info {
    background: var(--bg-alt);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    overflow: hidden;
}
.pricing-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--border-light);
    font-size: var(--text-sm);
}
.pricing-row:last-child { border-bottom: none; }
.pricing-row span { color: var(--text-secondary); }
.pricing-row strong { color: var(--text); }

/* Coupon banner */
.coupon-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    background: linear-gradient(135deg, var(--success-bg) 0%, #f0fdf4 100%);
    border: 2px solid var(--success);
    border-radius: var(--radius);
    padding: var(--space-md) var(--space-lg);
    margin-bottom: var(--space-2xl);
    flex-wrap: wrap;
}
.coupon-left {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}
.coupon-badge {
    background: var(--success);
    color: white;
    font-size: var(--text-xs);
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Related articles list */
.related-articles-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}
.related-article-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md);
    background: var(--bg-alt);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    transition: all var(--duration) var(--ease);
    gap: var(--space-md);
}
.related-article-item:hover {
    border-color: var(--primary);
    background: var(--primary-bg-subtle);
}
.related-article-item strong {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text);
    flex: 1;
}
.related-article-item .card-meta {
    font-size: var(--text-xs);
    color: var(--text-muted);
    white-space: nowrap;
}

/* Verdict section */
.review-verdict {
    background: linear-gradient(135deg, var(--primary-bg) 0%, #f0f9ff 100%);
    border: 2px solid var(--brand, var(--primary));
    border-radius: var(--radius);
    padding: var(--space-xl);
    text-align: center;
}
.review-verdict h2 { margin-bottom: var(--space-md); }
.review-verdict p {
    font-size: var(--text-md);
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-lg);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Review sidebar */
.review-sidebar {
    display: none;
}
@media (min-width: 1024px) {
    .review-sidebar {
        display: flex;
        flex-direction: column;
        gap: var(--space-lg);
    }
}
.sidebar-card {
    background: var(--bg-alt);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: var(--space-lg);
    position: sticky;
    top: 88px;
}
.sidebar-card h4 {
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}

/* Quick info in sidebar */
.quick-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}
.qi-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: var(--text-sm);
    border-bottom: 1px solid var(--border-light);
}
.qi-row:last-child { border-bottom: none; }
.qi-row span { color: var(--text-muted); }
.qi-row strong, .qi-row a { font-weight: 600; color: var(--text); }
.qi-row a { color: var(--primary); }

/* Alternatives list in sidebar */
.alternatives-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}
.alt-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
    transition: background var(--duration) var(--ease);
}
.alt-item:hover { background: white; }
.alt-item img {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-xs);
}
.alt-item strong {
    display: block;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text);
}
.alt-item span {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

/* ============================================================
   30. MOBILE OVERRIDES — Software, Deals, Product Review
   ============================================================ */
@media (max-width: 768px) {
    .software-stats { gap: var(--space-md); }
    .stat-number { font-size: var(--text-2xl); }

    .category-section-header { flex-direction: column; }

    .product-hero-inner {
        flex-direction: column;
        text-align: center;
    }
    .product-hero-info h1 { font-size: var(--text-2xl); }

    .quick-info-items {
        gap: var(--space-md);
    }

    .deal-highlight-inner { flex-direction: column; }
    .deal-highlight-code { width: 100%; }

    .score-bar-row {
        grid-template-columns: 90px 1fr 36px;
        gap: var(--space-sm);
    }

    /* Review hero: stack on mobile */
    .review-hero-inner {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    .review-title-row {
        flex-direction: column;
        text-align: center;
    }
    .review-title-row h1 { font-size: var(--text-2xl); }
    .review-actions { justify-content: center; }
    .review-score-card { max-width: 320px; margin: 0 auto; }

    /* Coupon banner stacked */
    .coupon-banner { flex-direction: column; text-align: center; }
    .coupon-left { justify-content: center; }

    /* Related article items stack */
    .related-article-item { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
    .filter-pills { padding: 0 var(--space-md); }
    .quick-info-items { gap: var(--space-sm); }
    .quick-info-item { min-width: calc(50% - var(--space-sm)); }

    .deal-card-top { flex-wrap: wrap; }
    .deal-badge { margin-top: var(--space-xs); }

    .sub-score-row { grid-template-columns: 60px 1fr 32px; }
}

/* ============================================
   MERMAID DIAGRAMS — Clean & Polished
   ============================================ */

.article-content .mermaid {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-top: 3px solid #6366f1;
    border-radius: 12px;
    padding: 32px 24px 24px;
    margin: 32px 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.02);
}

.article-content .mermaid svg {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto !important;
}

/* Diagram block wrapper */
.diagram-block {
    margin: 36px 0;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.diagram-block.visible { opacity: 1; transform: translateY(0); }
.diagram-block .mermaid { margin: 0; }

/* Label pill */
.diagram-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6366f1;
    background: #eef2ff;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 10px;
}
.diagram-label svg { width: 14px; height: 14px; stroke: currentColor; fill: none; }

/* Title & caption */
.diagram-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 14px 0;
}
.diagram-caption {
    font-size: 0.82rem;
    color: #64748b;
    font-style: italic;
    margin: 10px 0 0;
    text-align: center;
}

/* Mobile */
@media (max-width: 768px) {
    .article-content .mermaid {
        padding: 20px 14px 16px;
        margin: 24px -16px;
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-top: 3px solid #6366f1;
    }
    .diagram-block { margin: 24px 0; }
    .diagram-label { margin-left: 16px; }
    .diagram-title { margin-left: 16px; margin-right: 16px; }
    .diagram-caption { margin-left: 16px; margin-right: 16px; }
}

@media print {
    .diagram-block { opacity: 1 !important; transform: none !important; }
    .article-content .mermaid { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
}
