/* KeywordVelocity — premium dashboard theme */

:root {
    --bg: #070b14;
    --bg-elevated: #0f1629;
    --bg-card: rgba(17, 24, 39, 0.72);
    --border: rgba(148, 163, 184, 0.12);
    --border-hover: rgba(96, 165, 250, 0.35);
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --accent: #3b82f6;
    --accent-glow: rgba(59, 130, 246, 0.25);
    --cyan: #22d3ee;
    --emerald: #34d399;
    --font: 'Inter', system-ui, sans-serif;
    --font-display: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, monospace;
    --radius: 1rem;
    --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body.site-body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(59, 130, 246, 0.18), transparent),
        radial-gradient(ellipse 60% 40% at 100% 0%, rgba(34, 211, 238, 0.08), transparent);
    line-height: 1.6;
}

.font-mono { font-family: var(--mono); }

.skip-link {
    position: absolute; left: -9999px; top: 0; z-index: 9999;
    padding: 0.75rem 1rem; background: var(--accent); color: white;
    text-decoration: none; border-radius: 0 0 0.5rem 0;
}
.skip-link:focus { left: 0; }

.site-header {
    position: sticky; top: 0; z-index: 100;
    backdrop-filter: blur(16px);
    background: rgba(7, 11, 20, 0.85);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    max-width: 1280px; margin: 0 auto; padding: 0.875rem 1.25rem;
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}

.brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: inherit; }
.brand.compact { margin-bottom: 0.75rem; }

.brand-mark {
    width: 2.25rem; height: 2.25rem; border-radius: 0.65rem;
    background: linear-gradient(135deg, #2563eb, #0891b2);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 0.75rem; color: white;
    box-shadow: 0 4px 20px var(--accent-glow);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 1rem; font-weight: 700; letter-spacing: -0.02em; }
.brand-text small { font-size: 0.65rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.08em; }

.main-nav { display: none; align-items: center; gap: 0.25rem; }
@media (min-width: 900px) { .main-nav { display: flex; } }

.nav-link {
    padding: 0.5rem 0.75rem; font-size: 0.8125rem; font-weight: 500;
    color: var(--text-muted); text-decoration: none; border-radius: 0.5rem;
    transition: color 0.2s, background 0.2s; border: none; background: none;
    cursor: pointer; font-family: inherit;
}
.nav-link:hover, .nav-link.active { color: var(--text); background: rgba(255,255,255,0.05); }
.nav-cta { background: rgba(59,130,246,0.15) !important; color: #93c5fd !important; border: 1px solid rgba(59,130,246,0.3); }

.nav-dropdown { position: relative; }
.nav-dropdown-menu {
    position: absolute; top: 100%; left: 0; min-width: 200px; padding: 0.5rem;
    background: var(--bg-elevated); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow);
    opacity: 0; visibility: hidden; transform: translateY(8px); transition: all 0.2s;
}
.nav-dropdown:hover .nav-dropdown-menu { opacity: 1; visibility: visible; transform: translateY(4px); }
.nav-dropdown-menu a {
    display: block; padding: 0.5rem 0.75rem; color: var(--text-muted);
    text-decoration: none; font-size: 0.8125rem; border-radius: 0.5rem;
}
.nav-dropdown-menu a:hover { background: rgba(255,255,255,0.05); color: var(--text); }

.mobile-menu-btn {
    display: flex; flex-direction: column; gap: 5px; padding: 0.5rem;
    background: none; border: none; cursor: pointer;
}
@media (min-width: 900px) { .mobile-menu-btn { display: none; } }
.mobile-menu-btn span { display: block; width: 22px; height: 2px; background: var(--text-muted); border-radius: 2px; }

.mobile-nav { display: flex; flex-direction: column; padding: 0 1.25rem 1rem; border-top: 1px solid var(--border); background: var(--bg-elevated); }
.mobile-nav[hidden] { display: none; }
.mobile-nav a { padding: 0.75rem 0; color: var(--text-muted); text-decoration: none; font-size: 0.875rem; border-bottom: 1px solid var(--border); }

.page-wrap { max-width: 1280px; margin: 0 auto; padding: 2rem 1.25rem 4rem; }
.page-hero { margin-bottom: 2.5rem; }
.page-hero h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); font-weight: 800; letter-spacing: -0.03em; margin: 0 0 0.75rem; line-height: 1.15; }
.page-hero p { color: var(--text-muted); font-size: 1.05rem; max-width: 640px; margin: 0; }

.prose-page { max-width: 760px; margin: 0 auto; }
.prose-page h2 { font-size: 1.25rem; font-weight: 700; margin: 2rem 0 0.75rem; }
.prose-page p, .prose-page li { color: var(--text-muted); font-size: 0.9375rem; }
.prose-page a { color: #93c5fd; }

.content-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 1.25rem; padding: 2rem; backdrop-filter: blur(12px);
}

.stats-bar { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-bottom: 2rem; }
@media (min-width: 768px) { .stats-bar { grid-template-columns: repeat(4, 1fr); } }

.stat-box {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.25rem; backdrop-filter: blur(8px);
}
.stat-box .label { font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-dim); font-weight: 600; }
.stat-box .value { font-size: 1.75rem; font-weight: 800; margin-top: 0.25rem; letter-spacing: -0.02em; }
.stat-box .sub { font-size: 0.75rem; color: var(--text-dim); margin-top: 0.25rem; }

.toolbar {
    display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between;
    margin-bottom: 2rem; padding: 1rem 1.25rem;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
}

.geo-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.toolbar-stacked { flex-direction: column; align-items: stretch; gap: 1rem; }
.toolbar-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; width: 100%; }
.toolbar-row-end { justify-content: flex-end; }
.toolbar-label {
    font-size: 0.625rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.1em; color: var(--text-dim); min-width: 4.5rem;
}

.commercial-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; flex: 1; }
.view-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.view-btn {
    padding: 0.5rem 1rem; font-size: 0.75rem; font-weight: 700;
    border-radius: 999px; border: 1px solid var(--border); background: rgba(0,0,0,0.25);
    color: var(--text-muted); cursor: pointer; transition: all 0.2s; font-family: inherit;
    white-space: nowrap;
}
.view-btn:hover { color: var(--text); border-color: var(--border-hover); }
.view-btn.active {
    background: rgba(52, 211, 153, 0.12); color: #34d399;
    border-color: rgba(52, 211, 153, 0.45);
}
.view-btn[data-view="commercial"].active {
    background: rgba(52, 211, 153, 0.18); color: #6ee7b7;
    border-color: rgba(52, 211, 153, 0.55); box-shadow: 0 0 16px rgba(52, 211, 153, 0.12);
}
.view-hint {
    flex: 1; min-width: 12rem; font-size: 0.75rem; color: var(--text-dim); line-height: 1.4;
}
.view-banner {
    margin: -0.5rem 0 1.5rem; padding: 0.875rem 1.125rem;
    background: rgba(52, 211, 153, 0.08); border: 1px solid rgba(52, 211, 153, 0.25);
    border-radius: var(--radius); font-size: 0.875rem; color: var(--text-muted); line-height: 1.6;
}
.view-banner strong { color: #6ee7b7; }
.commercial-btn {
    padding: 0.45rem 0.875rem; font-size: 0.6875rem; font-weight: 600;
    border-radius: 999px; border: 1px solid var(--border); background: rgba(0,0,0,0.25);
    color: var(--text-muted); cursor: pointer; transition: all 0.2s; font-family: inherit;
    white-space: nowrap;
}
.commercial-btn:hover { color: var(--text); border-color: var(--border-hover); }
.commercial-btn.active {
    background: rgba(52, 211, 153, 0.12); color: #34d399;
    border-color: rgba(52, 211, 153, 0.45);
}
.commercial-btn[data-commercial="high"].active {
    background: rgba(52, 211, 153, 0.15); color: #34d399;
    border-color: rgba(52, 211, 153, 0.5);
}

.range-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; flex: 1; }
.range-btn {
    padding: 0.45rem 0.875rem; font-size: 0.6875rem; font-weight: 600;
    border-radius: 999px; border: 1px solid var(--border); background: rgba(0,0,0,0.25);
    color: var(--text-muted); cursor: pointer; transition: all 0.2s; font-family: inherit;
    white-space: nowrap;
}
.range-btn:hover { color: var(--text); border-color: var(--border-hover); }
.range-btn.active {
    background: rgba(34, 211, 238, 0.12); color: #67e8f9;
    border-color: rgba(34, 211, 238, 0.45); box-shadow: 0 0 16px rgba(34, 211, 238, 0.12);
}

.range-status {
    margin-top: 1rem; font-size: 0.875rem; color: var(--text-muted);
}
.range-status strong { color: #67e8f9; }

.trend-grid { transition: opacity 0.25s ease; }

.geo-btn {
    padding: 0.5rem 1rem; font-size: 0.75rem; font-weight: 600; border-radius: 0.625rem;
    border: 1px solid transparent; background: transparent; color: var(--text-muted);
    cursor: pointer; transition: all 0.2s; white-space: nowrap; font-family: inherit;
    text-decoration: none; display: inline-block;
}
.geo-btn:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.geo-btn.active {
    background: linear-gradient(135deg, #2563eb, #1d4ed8); color: white;
    border-color: rgba(59,130,246,0.5); box-shadow: 0 4px 16px var(--accent-glow);
}

.sync-badge {
    display: flex; align-items: center; gap: 0.5rem; font-size: 0.75rem;
    font-family: var(--mono); color: var(--text-dim); padding: 0.5rem 0.875rem;
    background: rgba(0,0,0,0.25); border-radius: 0.5rem; border: 1px solid var(--border);
}
.sync-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--emerald); animation: pulse-dot 2s infinite; }
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

.search-box { position: relative; }
.search-box input {
    width: 100%; max-width: 280px; padding: 0.625rem 1rem 0.625rem 2.5rem;
    background: rgba(0,0,0,0.3); border: 1px solid var(--border); border-radius: 0.625rem;
    color: var(--text); font-size: 0.8125rem; outline: none; font-family: inherit;
}
.search-box input:focus { border-color: var(--border-hover); box-shadow: 0 0 0 3px var(--accent-glow); }
.search-box::before {
    content: '⌕'; position: absolute; left: 0.875rem; top: 50%;
    transform: translateY(-50%); color: var(--text-dim); font-size: 1rem;
}

.trend-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 640px) { .trend-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .trend-grid { grid-template-columns: repeat(3, 1fr); } }

.trend-card {
    display: block; background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 1.25rem; padding: 1.5rem; text-decoration: none; color: inherit;
    transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
    backdrop-filter: blur(10px); position: relative; overflow: hidden;
}
.trend-card:hover { border-color: var(--border-hover); transform: translateY(-3px); box-shadow: var(--shadow); }

.trend-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; margin-bottom: 1rem; }
.category-pill {
    font-size: 0.625rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
    padding: 0.25rem 0.5rem; border-radius: 0.375rem;
    background: rgba(59,130,246,0.12); color: #93c5fd;
}
.momentum-badge { font-size: 0.625rem; font-weight: 700; padding: 0.25rem 0.5rem; border-radius: 999px; white-space: nowrap; }
.momentum-breakout { background: rgba(249,115,22,0.15); color: #fb923c; }
.momentum-rising { background: rgba(52,211,153,0.15); color: #34d399; }
.momentum-stable { background: rgba(148,163,184,0.12); color: #94a3b8; }
.momentum-cooling { background: rgba(96,165,250,0.12); color: #60a5fa; }
.momentum-new { background: rgba(168,85,247,0.15); color: #c084fc; }

.trend-title {
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 600;
    margin: 0 0 0.75rem;
    letter-spacing: 0.012em;
    line-height: 1.35;
    font-variant-ligatures: none;
    font-feature-settings: "liga" 0, "calt" 0;
}
.trend-title-lg {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin: 0 0 1rem;
}

.trend-meta-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.region-chip, .cross-border-chip {
    font-size: 0.75rem; padding: 0.25rem 0.625rem; border-radius: 999px;
    background: rgba(0,0,0,0.3); border: 1px solid var(--border); color: var(--text-muted);
}
.cross-border-chip { border-color: rgba(34,211,238,0.3); color: #67e8f9; }

.live-rate-box {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.875rem 1rem; background: rgba(0,0,0,0.35);
    border: 1px solid var(--border); border-radius: 0.875rem; margin-bottom: 1rem; transition: all 0.35s;
}
.live-rate-box.pulse-active {
    border-color: rgba(34,211,238,0.5); background: rgba(34,211,238,0.08);
    box-shadow: 0 0 20px rgba(34,211,238,0.12);
}
.live-rate-label {
    display: flex; align-items: center; gap: 0.5rem; font-size: 0.6875rem;
    text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); font-weight: 600;
}
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); animation: pulse-dot 1.5s infinite; }
.live-counter { font-size: 1.125rem; font-weight: 700; color: var(--cyan); }

.trend-stats-row { display: flex; justify-content: space-between; padding-top: 0.875rem; border-top: 1px solid var(--border); }
.stat-label { display: block; font-size: 0.625rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); font-weight: 600; }
.stat-value { display: block; font-size: 0.9375rem; font-weight: 700; margin-top: 0.125rem; }
.commercial-high { color: var(--emerald); }
.commercial-medium { color: #fbbf24; }
.commercial-low { color: var(--text-muted); }
.commercial-value {
    display: flex; flex-direction: column; align-items: flex-end; gap: 0.125rem;
    line-height: 1.2;
}
.commercial-tier { font-size: 0.875rem; letter-spacing: 0.05em; }
.benchmark-cpc { font-size: 0.8125rem; font-weight: 700; color: var(--text); }
.stat-sublabel {
    display: block; margin-top: 0.2rem; font-size: 0.5625rem;
    text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dim);
}
.currency-select {
    padding: 0.5rem 0.75rem; font-size: 0.75rem; font-family: inherit;
    background: rgba(0,0,0,0.25); border: 1px solid var(--border);
    border-radius: 0.5rem; color: var(--text-muted); cursor: pointer;
}
.currency-select:hover, .currency-select:focus {
    color: var(--text); border-color: var(--border-hover); outline: none;
}

.card-link-hint {
    display: block; margin-top: 1rem; font-size: 0.75rem; font-weight: 600; color: #93c5fd;
    opacity: 0; transform: translateY(4px); transition: all 0.2s;
}
.trend-card:hover .card-link-hint { opacity: 1; transform: translateY(0); }

.empty-state {
    grid-column: 1 / -1; text-align: center; padding: 4rem 2rem;
    border: 1px dashed var(--border); border-radius: var(--radius); color: var(--text-dim);
}

.breadcrumb { font-size: 0.8125rem; color: var(--text-dim); margin-bottom: 1rem; }
.breadcrumb a { color: #93c5fd; text-decoration: none; }

.detail-grid { display: grid; gap: 1.5rem; }
@media (min-width: 900px) { .detail-grid { grid-template-columns: 2fr 1fr; } }

.news-list { list-style: none; padding: 0; margin: 0; }
.news-list li { padding: 0.875rem 0; border-bottom: 1px solid var(--border); }
.news-list a { color: #93c5fd; text-decoration: none; font-weight: 500; font-size: 0.875rem; }
.news-source { font-size: 0.75rem; color: var(--text-dim); margin-top: 0.25rem; }

.faq-item { margin-bottom: 1.25rem; }
.faq-item h3 { font-size: 0.9375rem; font-weight: 600; margin: 0 0 0.375rem; }
.faq-item p { font-size: 0.875rem; color: var(--text-muted); margin: 0; }

.disclaimer-box {
    margin-top: 2rem; padding: 1rem 1.25rem;
    background: rgba(59,130,246,0.08); border: 1px solid rgba(59,130,246,0.2);
    border-radius: 0.75rem; font-size: 0.8125rem; color: var(--text-muted);
}

.insight-article { padding-bottom: 2.5rem; margin-bottom: 2.5rem; border-bottom: 1px solid var(--border); }
.insight-tag { font-size: 0.6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: #93c5fd; font-family: var(--mono); }
.insight-article h2 { font-size: 1.5rem; font-weight: 800; margin: 0.5rem 0 1rem; letter-spacing: -0.01em; }
.insight-title-link { color: var(--text); text-decoration: none; }
.insight-title-link:hover { color: #93c5fd; }
.insight-read-more { font-size: 0.875rem; font-weight: 600; color: #67e8f9; text-decoration: none; }
.insight-read-more:hover { text-decoration: underline; }

.ad-slot {
    margin: 1.5rem 0; padding: 1rem; text-align: center; min-height: 90px;
    border: 1px dashed var(--border); border-radius: var(--radius);
}

.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.75rem 1.25rem; font-size: 0.875rem; font-weight: 600;
    border-radius: 0.625rem; border: none; cursor: pointer; text-decoration: none;
    font-family: inherit; transition: all 0.2s;
}
.btn-primary { background: linear-gradient(135deg, #2563eb, #1d4ed8); color: white; }
.btn-primary:hover { box-shadow: 0 8px 24px var(--accent-glow); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text-muted); border: 1px solid var(--border); }

.site-footer {
    border-top: 1px solid var(--border); background: rgba(0,0,0,0.35);
    padding: 3rem 1.25rem 2rem; margin-top: 4rem;
}
.footer-grid { max-width: 1280px; margin: 0 auto; display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-heading { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); margin: 0 0 1rem; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a { color: var(--text-muted); text-decoration: none; font-size: 0.875rem; }
.footer-links a:hover { color: var(--text); }
.footer-desc { font-size: 0.875rem; color: var(--text-dim); max-width: 320px; }
.footer-bottom {
    max-width: 1280px; margin: 2.5rem auto 0; padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between;
    font-size: 0.75rem; color: var(--text-dim);
}

.cookie-banner {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 200; padding: 1rem;
    background: rgba(15, 22, 41, 0.95); border-top: 1px solid var(--border); backdrop-filter: blur(16px);
}
.cookie-banner[hidden] { display: none; }
.cookie-inner {
    max-width: 960px; margin: 0 auto;
    display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between;
}
.cookie-inner p { margin: 0; font-size: 0.8125rem; color: var(--text-muted); max-width: 560px; }
.cookie-inner a { color: #93c5fd; }
.cookie-actions { display: flex; gap: 0.5rem; }

.sort-select {
    padding: 0.5rem 0.75rem; background: rgba(0,0,0,0.3);
    border: 1px solid var(--border); border-radius: 0.5rem;
    color: var(--text); font-size: 0.75rem; font-family: inherit; cursor: pointer;
}
