/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
    --bg: #0a0e17;
    --bg-card: #111827;
    --bg-card-hover: #1a2235;
    --border: #1e293b;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --green: #10b981;
    --green-bg: rgba(16, 185, 129, 0.1);
    --red: #ef4444;
    --red-bg: rgba(239, 68, 68, 0.1);
    --yellow: #f59e0b;
    --gradient: linear-gradient(135deg, #3b82f6, #8b5cf6);
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 24px rgba(0,0,0,0.3);
}
html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; height: auto; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* === Navbar === */
.navbar {
    background: rgba(10, 14, 23, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0 0;
}
.navbar-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; color: var(--text); }
.logo-icon { background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; font-size: 1.5rem; }
.nav-links { display: flex; gap: 8px; }
.nav-links a {
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--bg-card); }
.mobile-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.mobile-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; transition: 0.3s; }

/* === Hero Section === */
.hero {
    padding: 60px 0 40px;
    text-align: center;
    background: linear-gradient(180deg, rgba(59,130,246,0.08) 0%, transparent 100%);
}
.hero h1 { font-size: 2.5rem; font-weight: 800; margin-bottom: 12px; line-height: 1.2; }
.hero h1 span { background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { color: var(--text-muted); font-size: 1.15rem; max-width: 600px; margin: 0 auto 24px; }

/* === Stats Bar === */
.stats-bar {
    display: flex;
    gap: 32px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 40px;
}
.stat-item { text-align: center; }
.stat-value { font-size: 1.5rem; font-weight: 700; color: var(--text); }
.stat-label { font-size: 0.8rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; }

/* === Price Table === */
.section { padding: 40px 0; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.section-header h2 { font-size: 1.5rem; font-weight: 700; }

.price-table { width: 100%; border-collapse: collapse; }
.price-table thead th {
    text-align: left;
    padding: 12px 16px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
}
.price-table thead th:first-child { padding-left: 20px; }
.price-table tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
    cursor: pointer;
}
.price-table tbody tr:hover { background: var(--bg-card-hover); }
.price-table td { padding: 14px 16px; font-size: 0.95rem; white-space: nowrap; }
.price-table td:first-child { padding-left: 20px; }
.coin-cell { display: flex; align-items: center; gap: 12px; }
.coin-icon { width: 32px; height: 32px; border-radius: 50%; background: var(--bg-card); }
.coin-name { font-weight: 600; }
.coin-symbol { color: var(--text-dim); font-size: 0.85rem; text-transform: uppercase; margin-left: 6px; }
.price-up { color: var(--green); }
.price-down { color: var(--red); }
.change-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}
.change-badge.up { background: var(--green-bg); color: var(--green); }
.change-badge.down { background: var(--red-bg); color: var(--red); }
.rank-num { color: var(--text-dim); font-weight: 500; }
.text-right { text-align: right; }

/* === Cards === */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: all 0.2s;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; }

/* === Exchange Cards === */
.exchange-card { display: flex; flex-direction: column; gap: 16px; }
.exchange-header { display: flex; align-items: center; gap: 16px; }
.exchange-logo {
    width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 1.2rem; color: white;
}
.exchange-logo.binance { background: #F0B90B; color: #000; }
.exchange-logo.coinbase { background: #0052FF; }
.exchange-logo.kraken { background: #5741D9; }
.exchange-logo.bybit { background: #F7A600; color: #000; }
.exchange-logo.okx { background: #000; border: 1px solid var(--border); }
.exchange-logo.kucoin { background: #23AF91; }
.exchange-name { font-size: 1.1rem; font-weight: 700; }
.exchange-meta { display: flex; gap: 16px; flex-wrap: wrap; }
.exchange-meta span { font-size: 0.85rem; color: var(--text-muted); }
.trust-score { display: flex; gap: 3px; }
.trust-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); }
.trust-dot.filled { background: var(--green); }
.exchange-desc { color: var(--text-muted); font-size: 0.9rem; flex-grow: 1; }
.exchange-cta {
    display: inline-block;
    padding: 10px 24px;
    background: var(--gradient);
    color: white;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    transition: opacity 0.2s;
}
.exchange-cta:hover { opacity: 0.9; color: white; }

/* === Comparison Table === */
.compare-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-top: 20px; }
.compare-item { padding: 20px; }
.compare-exchange { font-weight: 600; font-size: 1rem; margin-bottom: 8px; }
.compare-price { font-size: 1.5rem; font-weight: 700; }
.compare-spread { font-size: 0.85rem; color: var(--text-muted); margin-top: 4px; }
.compare-diff { margin-top: 8px; }
.compare-diff.saving { color: var(--green); font-weight: 600; }

/* === Calculator === */
.calc-container { max-width: 600px; margin: 0 auto; }
.calc-box { padding: 32px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 8px; font-size: 0.9rem; }
.form-input, .form-select {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
}
.form-input:focus, .form-select:focus { outline: none; border-color: var(--accent); }
.form-select option { background: var(--bg); color: var(--text); }
.calc-result {
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 24px;
    text-align: center;
    margin-top: 20px;
}
.calc-result-value { font-size: 2rem; font-weight: 800; background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.calc-result-label { color: var(--text-muted); font-size: 0.9rem; margin-top: 4px; }

/* === Articles === */
.article-card { display: flex; flex-direction: column; gap: 12px; }
.article-card h3 { font-size: 1.1rem; line-height: 1.4; }
.article-card h3 a { color: var(--text); }
.article-card h3 a:hover { color: var(--accent); }
.article-meta { display: flex; gap: 12px; font-size: 0.8rem; color: var(--text-dim); }
.article-category {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    background: rgba(59,130,246,0.15);
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}
.article-excerpt { color: var(--text-muted); font-size: 0.9rem; }
.article-body { max-width: 800px; margin: 0 auto; line-height: 1.8; }
.article-body h2 { margin: 32px 0 16px; font-size: 1.4rem; }
.article-body h3 { margin: 24px 0 12px; font-size: 1.2rem; }
.article-body p { margin-bottom: 16px; color: var(--text-muted); }
.article-body ul, .article-body ol { margin-bottom: 16px; padding-left: 24px; color: var(--text-muted); }
.article-body li { margin-bottom: 8px; }
.article-body strong { color: var(--text); }

/* === Coin Detail === */
.coin-hero { padding: 40px 0; }
.coin-hero-inner { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.coin-hero-icon { width: 56px; height: 56px; border-radius: 50%; }
.coin-hero h1 { font-size: 2rem; }
.coin-price-big { font-size: 2.5rem; font-weight: 800; margin-top: 8px; }
.coin-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-top: 24px; }
.coin-stat { padding: 16px; }
.coin-stat-label { font-size: 0.8rem; color: var(--text-dim); text-transform: uppercase; margin-bottom: 4px; }
.coin-stat-value { font-size: 1.15rem; font-weight: 600; }

/* === Badge Links === */
.badge-link {
    display: inline-block; padding: 6px 14px; background: var(--bg-card);
    border: 1px solid var(--border); border-radius: 20px; color: var(--accent);
    font-size: 0.85rem; text-decoration: none; transition: all 0.2s;
}
.badge-link:hover { background: var(--bg-card-hover); border-color: var(--accent); }

/* === Newsletter === */
.newsletter-section { padding: 60px 0; }
.newsletter-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 48px;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}
.newsletter-box h2 { font-size: 1.5rem; margin-bottom: 8px; }
.newsletter-box p { color: var(--text-muted); margin-bottom: 24px; }
.newsletter-form { display: flex; gap: 8px; max-width: 420px; margin: 0 auto; }
.newsletter-form input {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.95rem;
}
.newsletter-form input:focus { outline: none; border-color: var(--accent); }
.newsletter-form button {
    padding: 12px 24px;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    font-size: 0.95rem;
    transition: opacity 0.2s;
}
.newsletter-form button:hover { opacity: 0.9; }
.subscribe-msg { margin-top: 12px; font-size: 0.9rem; }
.subscribe-msg.success { color: var(--green); }
.subscribe-msg.error { color: var(--red); }
.newsletter-note { color: var(--text-dim); font-size: 0.8rem; margin-top: 12px; }

/* === Newsletter Popup Modal === */
.mq-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.75); z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    animation: mq-fadeIn 0.3s ease;
}
.mq-modal {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 40px 36px 32px;
    max-width: 460px; width: 90%; text-align: center;
    position: relative; animation: mq-slideIn 0.3s ease;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.mq-modal-close {
    position: absolute; top: 12px; right: 16px; background: none;
    border: none; color: var(--text-dim); font-size: 1.8rem;
    cursor: pointer; line-height: 1; transition: color 0.2s;
}
.mq-modal-close:hover { color: var(--text); }
.mq-modal-icon { font-size: 2.5rem; margin-bottom: 12px; }
.mq-modal h2 { font-size: 1.4rem; margin-bottom: 8px; }
.mq-modal p { color: var(--text-muted); margin-bottom: 20px; font-size: 0.95rem; }
.mq-modal .newsletter-form { max-width: 100%; }
@keyframes mq-fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes mq-slideIn { from { opacity: 0; transform: translateY(-20px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (max-width: 480px) { .mq-modal { padding: 28px 20px 24px; } }

/* === Sticky Subscribe Bar === */
.mq-sticky-bar {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 999;
    background: var(--bg-card); border-top: 1px solid var(--border);
    padding: 12px 20px; display: flex; align-items: center; justify-content: center; gap: 16px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.3); animation: mq-slideUp 0.4s ease;
    font-size: 0.95rem;
}
.mq-sticky-bar span { color: var(--text); font-weight: 500; }
.mq-sticky-cta {
    display: inline-block; padding: 8px 20px; background: var(--accent); color: #000;
    border-radius: 6px; font-weight: 700; font-size: 0.85rem; text-decoration: none;
    white-space: nowrap;
}
.mq-sticky-cta:hover { opacity: 0.85; }
.mq-sticky-close {
    background: none; border: none; color: var(--text-dim); font-size: 1.4rem;
    cursor: pointer; line-height: 1; padding: 0 4px;
}
@keyframes mq-slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@media (max-width: 480px) { .mq-sticky-bar { font-size: 0.85rem; gap: 10px; padding: 10px 14px; } }

/* === Alert Form === */
.alert-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 10px; }
.alert-field label { display: block; font-size: 0.85rem; color: var(--text-dim); margin-bottom: 4px; }
.alert-field select, .alert-field input {
    width: 100%; padding: 10px 14px; background: var(--bg); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text); font-size: 0.95rem;
}
.alert-field select:focus, .alert-field input:focus { outline: none; border-color: var(--accent); }
.alert-widget select, .alert-widget input[type="number"], .alert-widget input[type="email"] {
    padding: 10px 14px; background: var(--bg); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text); font-size: 0.95rem;
}
.alert-widget select:focus, .alert-widget input:focus { outline: none; border-color: var(--accent); }
.btn-danger { background: var(--red); color: white; border: none; border-radius: var(--radius-sm); cursor: pointer; font-weight: 600; }
.btn-danger:hover { opacity: 0.8; }
.alerts-cta-banner {
    display: flex; align-items: center; gap: 12px; padding: 16px 24px;
    background: linear-gradient(135deg, rgba(59,130,246,0.1), rgba(139,92,246,0.1));
    border: 1px solid rgba(59,130,246,0.25); border-radius: var(--radius);
    color: var(--text); text-decoration: none; transition: border-color 0.2s;
}
.alerts-cta-banner:hover { border-color: var(--accent); color: var(--text); }
@media (max-width: 768px) {
    .alert-form-grid { grid-template-columns: 1fr; }
    #coinAlertForm { flex-direction: column; }
    #coinAlertForm > div { min-width: 100% !important; }
    .alerts-cta-banner { flex-direction: column; text-align: center; }
}

/* === Footer === */
.site-footer { border-top: 1px solid var(--border); padding: 48px 0 32px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-col h3 { font-size: 1.1rem; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.footer-col h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-dim); margin-bottom: 16px; }
.footer-col p { color: var(--text-muted); font-size: 0.9rem; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: var(--text-muted); font-size: 0.9rem; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 24px; text-align: center; }
.footer-bottom p { color: var(--text-dim); font-size: 0.85rem; }
.footer-disclaimer { margin-top: 8px; font-size: 0.8rem; }

/* === Buttons === */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}
.btn-primary { background: var(--gradient); color: white; }
.btn-primary:hover { opacity: 0.9; color: white; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* === Pagination === */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 32px; }
.pagination a, .pagination span {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
}
.pagination a { background: var(--bg-card); color: var(--text-muted); border: 1px solid var(--border); }
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination span.current { background: var(--accent); color: white; }

/* === Search === */
.search-box {
    position: relative;
    max-width: 400px;
}
.search-box input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.9rem;
}
.search-box input:focus { outline: none; border-color: var(--accent); }
.search-box::before {
    content: '\1F50D';
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    opacity: 0.5;
}

/* === Ad Slots === */
.ad-slot { margin: 24px 0; text-align: center; min-height: 90px; }

/* === Loading === */
.loading { text-align: center; padding: 40px; color: var(--text-dim); }
.spinner {
    display: inline-block;
    width: 32px; height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* === 404 === */
.error-page { text-align: center; padding: 80px 0; }
.error-page h1 { font-size: 6rem; font-weight: 800; background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.error-page p { color: var(--text-muted); font-size: 1.2rem; margin: 16px 0 32px; }

/* === Responsive === */
@media (max-width: 768px) {
    .mobile-toggle { display: block; }
    .nav-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        padding: 16px 20px;
        flex-direction: column;
    }
    .nav-links.open { display: flex; }
    .hero h1 { font-size: 1.8rem; }
    .hero p { font-size: 1rem; }
    .stats-bar { gap: 20px; }
    .stat-value { font-size: 1.2rem; }
    .price-table { font-size: 0.85rem; }
    .price-table td, .price-table th { padding: 10px 8px; }
    .hide-mobile { display: none; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
    .newsletter-box { padding: 32px 20px; }
    .newsletter-form { flex-direction: column; }
    .card-grid { grid-template-columns: 1fr; }
    .coin-price-big { font-size: 1.8rem; }
    .coin-stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr; }
    .stats-bar { flex-direction: column; gap: 12px; }
}

/* === Top Movers Widget === */
.movers-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.movers-col { min-width: 0; }
.movers-label { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; padding: 6px 0 10px; }
.gainers-label { color: var(--green); }
.losers-label { color: var(--red); }
.movers-list { display: flex; flex-direction: column; gap: 6px; }
.mover-card {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text);
    transition: border-color 0.2s, background 0.2s;
}
.mover-card:hover { border-color: var(--accent); background: var(--bg-card-hover); color: var(--text); }
.mover-card.gainer:hover { border-color: var(--green); }
.mover-card.loser:hover { border-color: var(--red); }
.mover-icon { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; }
.mover-icon-placeholder { background: var(--border); display: flex; align-items: center; justify-content: center; font-size: 0.6rem; font-weight: 700; color: var(--text-dim); }
.mover-info { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.mover-name { font-weight: 700; font-size: 0.85rem; text-transform: uppercase; }
.mover-price { font-size: 0.75rem; color: var(--text-muted); }
.mover-pct { font-weight: 700; font-size: 0.9rem; flex-shrink: 0; }
.mover-pct.up { color: var(--green); }
.mover-pct.down { color: var(--red); }
@media (max-width: 640px) {
    .movers-grid { grid-template-columns: 1fr; }
}

/* === Fear & Greed Index Widget === */
.fg-widget {
    display: flex;
    align-items: center;
    gap: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 24px;
    flex-wrap: wrap;
}
.fg-label { display: flex; flex-direction: column; min-width: 180px; }
.fg-title { font-weight: 700; font-size: 0.95rem; }
.fg-updated { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }
.fg-meter { flex: 1; min-width: 200px; }
.fg-track {
    position: relative;
    height: 12px;
    background: linear-gradient(to right, #ef4444, #f97316, #eab308, #22c55e, #10b981);
    border-radius: 6px;
    overflow: visible;
}
.fg-fill { display: none; }
.fg-needle {
    position: absolute;
    top: -4px;
    width: 4px;
    height: 20px;
    background: white;
    border-radius: 2px;
    transform: translateX(-50%);
    box-shadow: 0 1px 4px rgba(0,0,0,0.5);
    border: 1px solid rgba(0,0,0,0.3);
}
.fg-labels-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.6rem;
    color: var(--text-dim);
    margin-top: 6px;
}
.fg-value-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
}
.fg-number { font-size: 2.2rem; font-weight: 800; line-height: 1; }
.fg-classification { font-size: 0.75rem; font-weight: 600; margin-top: 4px; }
@media (max-width: 640px) {
    .fg-widget { gap: 16px; }
    .fg-label { min-width: 0; }
}

/* === Related Articles Grid === */
.related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.related-card {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 20px;
    text-decoration: none;
    color: var(--text);
    transition: border-color 0.2s, transform 0.2s;
}
.related-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}
.related-card h3 {
    font-size: 0.95rem;
    margin: 8px 0;
    line-height: 1.4;
}
.related-category {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent);
    font-weight: 600;
}
.related-meta {
    display: flex;
    gap: 12px;
    font-size: 0.75rem;
    color: var(--text-muted);
}
@media (max-width: 640px) {
    .related-grid { grid-template-columns: 1fr; }
}

/* === Popular Articles on Homepage === */
.popular-articles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.popular-article-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 20px;
    text-decoration: none;
    color: var(--text);
    transition: border-color 0.2s, transform 0.2s;
}
.popular-article-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}
.popular-article-card h3 {
    font-size: 0.9rem;
    margin: 8px 0;
    line-height: 1.4;
    flex: 1;
}
.popular-article-card .article-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    gap: 10px;
}
@media (max-width: 768px) {
    .popular-articles { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .popular-articles { grid-template-columns: 1fr; }
}

/* Glossary auto-links in articles */
.glossary-link {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px dotted var(--accent);
    transition: border-color 0.2s;
}
.glossary-link:hover {
    border-bottom-style: solid;
}

/* Tools page */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 24px;
}
.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px;
    text-decoration: none;
    color: var(--text);
    transition: border-color 0.2s, transform 0.2s;
    display: flex;
    flex-direction: column;
}
.tool-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}
.tool-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}
.tool-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}
.tool-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    flex-grow: 1;
}
.tool-card .tool-cta {
    margin-top: 16px;
    color: var(--accent);
    font-weight: 600;
    font-size: 0.9rem;
}
@media (max-width: 768px) {
    .tools-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .tools-grid { grid-template-columns: 1fr; }
}
