@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --bg: #0a0a0b;
    --surface: #141416;
    --surface-hover: #1c1c1f;
    --text: #ededef;
    --text-secondary: #9b9ba0;
    --text-muted: #636369;
    --accent: #5e6ad2;
    --accent-hover: #7170ff;
    --accent-dim: rgba(94, 106, 210, 0.15);
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.10);
    --success: #3fb950;
    --warn: #d2991d;
    /* Asset class colors */
    --equity: #5e6ad2;
    --crypto: #f0883e;
    --commodity: #3fb950;
    --forex: #a371f7;
    --bond: #8b949e;
    --bullish: #3fb950;
    --bearish: #f85149;
    --neutral: #8b949e;
    --radius-sm: 4px; --radius-md: 6px; --radius-lg: 8px; --radius-pill: 9999px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; -webkit-font-smoothing: antialiased; }

nav { position: sticky; top: 0; z-index: 100; background: var(--surface); border-bottom: 1px solid var(--border); backdrop-filter: blur(12px); }
.nav-inner { max-width: 1040px; margin: 0 auto; padding: 0 24px; height: 56px; display: flex; align-items: center; gap: 4px; }
.nav-logo { font-size: 1rem; font-weight: 600; color: var(--text); text-decoration: none; margin-right: 16px; white-space: nowrap; }
.nav-logo span { color: var(--accent); }
.nav-link { padding: 6px 14px; border-radius: var(--radius-md); font-size: 0.875rem; font-weight: 500; color: var(--text-secondary); text-decoration: none; transition: all 0.15s; border: 1px solid transparent; }
.nav-link:hover { color: var(--text); background: var(--surface-hover); }
.nav-link.active { color: var(--text); background: var(--accent-dim); border-color: rgba(94, 106, 210, 0.25); }
.nav-search { margin-left: auto; background: var(--surface-hover); border: 1px solid var(--border); color: var(--text-secondary); padding: 6px 12px; border-radius: var(--radius-md); font-size: 0.8125rem; font-family: inherit; width: 200px; transition: all 0.15s; }
.nav-search:focus { outline: none; border-color: var(--accent); color: var(--text); width: 260px; }
.nav-hamburger { display: none; background: none; border: 1px solid var(--border); color: var(--text-secondary); font-size: 1.25rem; padding: 6px 10px; border-radius: var(--radius-md); cursor: pointer; margin-left: auto; }

.hero { max-width: 1040px; margin: 0 auto; padding: 100px 24px 80px; text-align: center; }
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 600; line-height: 1.15; letter-spacing: -0.02em; margin-bottom: 16px; }
.hero p { font-size: 1.125rem; color: var(--text-secondary); max-width: 560px; margin: 0 auto 32px; line-height: 1.6; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 24px; border-radius: var(--radius-md); font-size: 0.875rem; font-weight: 500; text-decoration: none; cursor: pointer; transition: all 0.15s; border: 1px solid transparent; font-family: inherit; }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--border-hover); }
.btn-secondary:hover { background: var(--surface-hover); }

/* Asset filters */
.asset-filters { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.asset-btn { padding: 8px 16px; border-radius: var(--radius-pill); font-size: 0.8125rem; font-weight: 500; cursor: pointer; border: 1px solid var(--border); background: transparent; color: var(--text-secondary); font-family: inherit; transition: all 0.15s; }
.asset-btn:hover { border-color: var(--border-hover); color: var(--text); }
.asset-btn.active { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }
.asset-btn.equity.active { border-color: var(--equity); color: var(--equity); background: rgba(94, 106, 210, 0.15); }
.asset-btn.crypto.active { border-color: var(--crypto); color: var(--crypto); background: rgba(240, 136, 62, 0.15); }
.asset-btn.commodity.active { border-color: var(--commodity); color: var(--commodity); background: rgba(63, 185, 80, 0.15); }
.asset-btn.forex.active { border-color: var(--forex); color: var(--forex); background: rgba(163, 113, 247, 0.15); }
.asset-btn.bond.active { border-color: var(--bond); color: var(--bond); background: rgba(139, 148, 158, 0.15); }

.section { max-width: 1040px; margin: 0 auto; padding: 60px 24px; }
.section h2 { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 8px; }
.section-subtitle { font-size: 0.9375rem; color: var(--text-secondary); margin-bottom: 24px; }

.preview-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.preview-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 20px; transition: all 0.15s;
}
.preview-card:hover { border-color: var(--border-hover); }
.preview-card h4 { font-size: 0.9375rem; font-weight: 500; margin-bottom: 8px; line-height: 1.4; }
.preview-card h4 a { color: var(--text); text-decoration: none; }
.preview-card h4 a:hover { color: var(--accent); }
.preview-meta { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 8px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.preview-summary { font-size: 0.8125rem; color: var(--text-secondary); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Badges */
.badge { font-size: 0.6875rem; font-weight: 500; padding: 2px 8px; border-radius: var(--radius-sm); }
.badge-ticker { background: var(--accent-dim); color: var(--accent); }
.badge-bullish { background: rgba(63, 185, 80, 0.15); color: var(--bullish); }
.badge-bearish { background: rgba(248, 81, 73, 0.15); color: var(--bearish); }
.badge-asset { background: var(--surface-hover); color: var(--text-muted); }
.badge-asset.equity { color: var(--equity); }
.badge-asset.crypto { color: var(--crypto); }
.badge-asset.commodity { color: var(--commodity); }
.badge-asset.forex { color: var(--forex); }
.badge-asset.bond { color: var(--bond); }

.view-all { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-size: 0.875rem; font-weight: 500; text-decoration: none; }
.view-all:hover { color: var(--accent-hover); }

/* API */
.api-cmd { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px 20px; margin-bottom: 24px; font-family: 'JetBrains Mono', monospace; font-size: 0.8125rem; color: var(--success); display: flex; align-items: center; gap: 12px; }
.api-cmd-prompt { color: var(--accent); }
.api-cmd-text { flex: 1; overflow-x: auto; white-space: nowrap; }
.api-cmd-copy { background: var(--surface-hover); border: 1px solid var(--border); color: var(--text-secondary); padding: 4px 10px; border-radius: var(--radius-sm); font-size: 0.75rem; cursor: pointer; font-family: inherit; }
.api-cmd-copy:hover { color: var(--text); }
.endpoint-list { display: grid; gap: 8px; margin-bottom: 24px; }
.endpoint-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); }
.endpoint-row:hover { border-color: var(--border-hover); }
.endpoint-method { font-size: 0.6875rem; font-weight: 600; text-transform: uppercase; padding: 2px 8px; border-radius: var(--radius-sm); background: rgba(63, 185, 80, 0.15); color: var(--success); }
.endpoint-path { font-family: 'JetBrains Mono', monospace; font-size: 0.8125rem; color: var(--text); flex: 1; }
.endpoint-desc { font-size: 0.8125rem; color: var(--text-secondary); }
.code-tabs { display: flex; gap: 0; }
.code-tab { padding: 8px 16px; font-size: 0.8125rem; font-weight: 500; color: var(--text-muted); background: transparent; border: 1px solid transparent; border-bottom: none; border-radius: var(--radius-md) var(--radius-md) 0 0; cursor: pointer; font-family: inherit; }
.code-tab.active { color: var(--text); background: var(--surface); border-color: var(--border); }
.code-block { background: var(--surface); border: 1px solid var(--border); border-radius: 0 var(--radius-md) var(--radius-md) var(--radius-md); padding: 16px 20px; overflow-x: auto; font-family: 'JetBrains Mono', monospace; font-size: 0.8125rem; line-height: 1.7; color: var(--text-secondary); display: none; }
.code-block.active { display: block; }
.code-block .kw { color: var(--accent); }
.code-block .str { color: var(--success); }

/* Feed */
.feed-container { max-width: 1040px; margin: 0 auto; padding: 40px 24px; }
.feed-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.feed-header h2 { font-size: 1.5rem; font-weight: 600; }
.feed-stats { font-size: 0.8125rem; color: var(--text-muted); }
.article-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; margin-bottom: 12px; transition: all 0.15s; }
.article-card:hover { border-color: var(--border-hover); }
.article-card h3 { font-size: 1.0625rem; font-weight: 500; margin-bottom: 8px; line-height: 1.4; }
.article-card h3 a { color: var(--text); text-decoration: none; }
.article-card h3 a:hover { color: var(--accent); }
.article-meta { font-size: 0.8125rem; color: var(--text-muted); margin-bottom: 10px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.article-summary { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.6; }
.article-tags { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.tag { font-size: 0.6875rem; font-weight: 500; padding: 3px 8px; border-radius: var(--radius-sm); background: var(--surface-hover); color: var(--text-muted); border: 1px solid var(--border); }
.empty-state { text-align: center; padding: 60px 24px; color: var(--text-muted); }
.skeleton { background: var(--surface-hover); border-radius: var(--radius-md); animation: pulse 1.5s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 0.7; } }
footer { border-top: 1px solid var(--border); padding: 32px 24px; text-align: center; font-size: 0.8125rem; color: var(--text-muted); }
footer a { color: var(--text-secondary); text-decoration: none; }
.tab-content { display: none; }
.tab-content.active { display: block; }

@media (max-width: 768px) {
    .nav-inner { flex-wrap: wrap; height: auto; padding: 12px 16px; gap: 8px; }
    .nav-links { display: none; width: 100%; flex-direction: column; gap: 4px; padding-top: 8px; border-top: 1px solid var(--border); }
    .nav-links.open { display: flex; }
    .nav-link { width: 100%; text-align: center; }
    .nav-search { width: 100%; margin-left: 0; }
    .nav-hamburger { display: block; }
    .hero { padding: 60px 16px 48px; }
    .hero h1 { font-size: 1.75rem; }
    .preview-grid { grid-template-columns: 1fr; }
    .section { padding: 40px 16px; }
    .endpoint-desc { display: none; }
    .feed-container { padding: 24px 16px; }
}