/* StockTi.com - Bloomberg Dark Theme */

:root {
    --bg-body: #0a0e17;
    --bg-card: #111827;
    --bg-card-hover: #1a2332;
    --bg-surface: #0f1520;
    --bg-input: #1a2332;
    --border: #1e293b;
    --border-light: #2a3a50;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --accent-light: rgba(59,130,246,0.1);
    --positive: #10b981;
    --positive-bg: rgba(16,185,129,0.1);
    --negative: #ef4444;
    --negative-bg: rgba(239,68,68,0.1);
    --warning: #f59e0b;
    --cyan: #06b6d4;
    --nav-height: 56px;
    --ticker-height: 36px;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
    --radius: 8px;
    --radius-sm: 4px;
    --radius-lg: 12px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--accent-hover); }

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

.container { max-width: 1320px; margin: 0 auto; padding: 0 20px; }

/* ── Ticker Bar ── */
.ticker-bar {
    background: #060a10;
    border-bottom: 1px solid var(--border);
    height: var(--ticker-height);
    overflow: hidden;
    position: sticky;
    top: 0;
    z-index: 1001;
}

.ticker-content {
    display: flex;
    align-items: center;
    height: 100%;
    gap: 0;
    animation: tickerScroll 60s linear infinite;
    white-space: nowrap;
}

.ticker-content:hover { animation-play-state: paused; }

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 16px;
    font-size: 12px;
    font-weight: 500;
    flex-shrink: 0;
    border-right: 1px solid var(--border);
    height: 100%;
}

.ticker-item .ticker-symbol { color: var(--text-secondary); font-weight: 600; }
.ticker-item .ticker-price { font-family: var(--font-mono); color: var(--text-primary); font-size: 12px; }
.ticker-item .ticker-change { font-family: var(--font-mono); font-size: 11px; font-weight: 600; }
.ticker-item .ticker-change.positive { color: var(--positive); }
.ticker-item .ticker-change.negative { color: var(--negative); }

.ticker-loading { color: var(--text-muted); font-size: 12px; padding: 0 20px; }

@keyframes tickerScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ── Navigation ── */
.main-nav {
    background: rgba(10, 14, 23, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    height: var(--nav-height);
    position: sticky;
    top: var(--ticker-height);
    z-index: 1000;
}

.nav-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    height: 100%;
    gap: 32px;
}

.nav-logo { display: flex; align-items: center; font-size: 22px; font-weight: 800; letter-spacing: -0.5px; }
.logo-stock { color: var(--text-primary); }
.logo-ti { color: var(--accent); }

.nav-links { display: flex; gap: 4px; }
.nav-link {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    transition: background 0.15s, color 0.15s;
}
.nav-link:hover, .nav-link.active { color: var(--text-primary); background: var(--accent-light); }

.nav-right { display: flex; align-items: center; gap: 16px; margin-left: auto; }

.nav-search {
    position: relative;
    width: 260px;
}
.nav-search input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 7px 16px;
    color: var(--text-primary);
    font-size: 13px;
    font-family: var(--font-sans);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.nav-search input::placeholder { color: var(--text-muted); }
.nav-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59,130,246,0.15); }

.search-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    max-height: 360px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}
.search-dropdown.active { display: block; }

.search-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.1s;
    border-bottom: 1px solid var(--border);
}
.search-result:last-child { border-bottom: none; }
.search-result:hover { background: var(--bg-card-hover); }
.search-result-symbol { font-weight: 700; font-size: 14px; }
.search-result-name { font-size: 12px; color: var(--text-muted); margin-left: 8px; }
.search-result-price { font-family: var(--font-mono); font-size: 13px; }

.market-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
}
.market-status.open .status-dot { background: var(--positive); animation: pulse 2s infinite; }
.market-status.open .status-text { color: var(--positive); }
.market-status.closed .status-dot { background: var(--negative); }
.market-status.closed .status-text { color: var(--text-muted); }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.nav-toggle span {
    width: 20px;
    height: 2px;
    background: var(--text-secondary);
    border-radius: 2px;
    transition: all 0.2s;
}

/* ── Main Content ── */
.main-content { min-height: 60vh; padding: 24px 0; }

/* ── Cards ── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.card-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

.card-body { padding: 20px; }

/* ── Section Headers ── */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.section-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.3px;
}
.section-link { font-size: 13px; font-weight: 500; }

/* ── Grid Layouts ── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* ── Homepage Hero ── */
.hero-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 32px;
}

.breaking-banner {
    background: linear-gradient(135deg, rgba(239,68,68,0.15), rgba(239,68,68,0.05));
    border: 1px solid rgba(239,68,68,0.3);
    border-radius: var(--radius);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.breaking-label {
    background: var(--negative);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    animation: pulse 1.5s infinite;
}
.breaking-text { font-size: 14px; font-weight: 500; color: var(--text-primary); }
.breaking-text a { color: var(--text-primary); }
.breaking-text a:hover { color: var(--accent); }

/* ── Article Cards ── */
.article-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.article-card:hover {
    border-color: var(--border-light);
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.article-card-image {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
}

.article-card-body { padding: 16px 20px; }
.article-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 12px;
}
.article-card-category {
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.article-card-time { color: var(--text-muted); }

.article-card-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.article-card-title a { color: var(--text-primary); }
.article-card-title a:hover { color: var(--accent); }

.article-card-excerpt {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card-tickers {
    display: flex;
    gap: 4px;
    margin-top: 10px;
    flex-wrap: wrap;
}
.ticker-tag {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    background: var(--accent-light);
    color: var(--accent);
}

/* Featured article large */
.article-featured {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    min-height: 400px;
    display: flex;
    align-items: flex-end;
}
.article-featured-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}
.article-featured-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent 30%, rgba(10,14,23,0.95));
}
.article-featured-content {
    position: relative;
    padding: 32px;
    width: 100%;
}
.article-featured-content .article-card-category { font-size: 13px; }
.article-featured-content .article-card-title { font-size: 24px; -webkit-line-clamp: 3; margin-bottom: 8px; }
.article-featured-content .article-card-excerpt { -webkit-line-clamp: 2; }

/* Article list item (compact) */
.article-list-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}
.article-list-item:last-child { border-bottom: none; }
.article-list-thumb {
    width: 80px;
    height: 60px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
}
.article-list-body { flex: 1; min-width: 0; }
.article-list-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.article-list-title a { color: var(--text-primary); }
.article-list-title a:hover { color: var(--accent); }
.article-list-time { font-size: 11px; color: var(--text-muted); }

/* ── Sector Heatmap ── */
.heatmap-container { margin-bottom: 32px; }

.heatmap-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
}

.heatmap-cell {
    padding: 16px 12px;
    border-radius: var(--radius-sm);
    text-align: center;
    cursor: pointer;
    transition: opacity 0.15s;
    position: relative;
}
.heatmap-cell:hover { opacity: 0.85; }
.heatmap-cell-name { font-size: 12px; font-weight: 600; color: #fff; margin-bottom: 4px; }
.heatmap-cell-value { font-family: var(--font-mono); font-size: 16px; font-weight: 700; color: #fff; }
.heatmap-cell-etf { font-family: var(--font-mono); font-size: 10px; color: rgba(255,255,255,0.6); margin-top: 2px; }

/* Heatmap spans */
.heatmap-grid .heatmap-cell:nth-child(1) { grid-column: span 2; }
.heatmap-grid .heatmap-cell:nth-child(2) { grid-column: span 2; }

/* ── Trending Stocks ── */
.trending-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
}
.trending-tab {
    padding: 6px 16px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    font-family: var(--font-sans);
}
.trending-tab:hover { border-color: var(--border-light); color: var(--text-secondary); }
.trending-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.trending-list { list-style: none; }
.trending-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    gap: 12px;
}
.trending-item:last-child { border-bottom: none; }
.trending-rank {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    width: 20px;
    text-align: center;
}
.trending-info { flex: 1; min-width: 0; }
.trending-symbol { font-weight: 700; font-size: 14px; }
.trending-name { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trending-spark { width: 60px; height: 24px; flex-shrink: 0; }
.trending-data { text-align: right; }
.trending-price { font-family: var(--font-mono); font-size: 14px; font-weight: 600; }
.trending-change { font-family: var(--font-mono); font-size: 12px; font-weight: 600; }

/* ── Market Indices Grid ── */
.indices-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 32px; }

.index-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    transition: border-color 0.15s;
}
.index-card:hover { border-color: var(--border-light); }
.index-name { font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.index-price { font-family: var(--font-mono); font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.index-change { font-family: var(--font-mono); font-size: 13px; font-weight: 600; }

/* ── Colors ── */
.positive { color: var(--positive); }
.negative { color: var(--negative); }
.bg-positive { background: var(--positive-bg); }
.bg-negative { background: var(--negative-bg); }

/* ── Stock Page ── */
.stock-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}
.stock-title-section { flex: 1; }
.stock-symbol-large { font-size: 14px; font-weight: 600; color: var(--accent); margin-bottom: 4px; font-family: var(--font-mono); }
.stock-name-large { font-size: 28px; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 4px; }
.stock-exchange { font-size: 13px; color: var(--text-muted); }

.stock-price-section { text-align: right; }
.stock-price-large { font-family: var(--font-mono); font-size: 36px; font-weight: 700; }
.stock-change-large { font-family: var(--font-mono); font-size: 18px; font-weight: 600; }

.stock-chart-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 24px;
}
.chart-period-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
}
.chart-period-tab {
    padding: 4px 12px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-sans);
    transition: all 0.15s;
}
.chart-period-tab:hover { border-color: var(--border-light); color: var(--text-secondary); }
.chart-period-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.stock-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 24px;
}
.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-card);
}
.stat-label { font-size: 13px; color: var(--text-muted); }
.stat-value { font-family: var(--font-mono); font-size: 14px; font-weight: 600; }

/* ── Calendar ── */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.calendar-day {
    background: var(--bg-card);
    min-height: 120px;
    padding: 10px;
}
.calendar-day-header {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.calendar-day.today .calendar-day-header { color: var(--accent); }
.calendar-event {
    font-size: 12px;
    padding: 4px 6px;
    border-radius: var(--radius-sm);
    margin-bottom: 4px;
    background: var(--bg-surface);
    border-left: 2px solid var(--accent);
}
.calendar-event-symbol { font-family: var(--font-mono); font-weight: 700; }
.calendar-event-time { color: var(--text-muted); font-size: 10px; }
.calendar-event.beat { border-left-color: var(--positive); }
.calendar-event.miss { border-left-color: var(--negative); }

/* ── Watchlist ── */
.watchlist-table {
    width: 100%;
    border-collapse: collapse;
}
.watchlist-table th,
.watchlist-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.watchlist-table th {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    background: var(--bg-surface);
}
.watchlist-table td { font-size: 14px; }
.watchlist-table .mono { font-family: var(--font-mono); }
.watchlist-table tr:hover { background: var(--bg-card-hover); }

.watchlist-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-sans);
    border: none;
    cursor: pointer;
    transition: background 0.15s, opacity 0.15s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-secondary { background: var(--bg-input); color: var(--text-secondary); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-danger { background: var(--negative); color: #fff; }
.btn-success { background: var(--positive); color: #fff; }

/* ── Forms ── */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.form-input, .form-textarea, .form-select {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 14px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: var(--font-sans);
    outline: none;
    transition: border-color 0.15s;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}
.form-textarea { resize: vertical; min-height: 120px; }

/* ── Article Page ── */

/* Breadcrumb */
.article-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 24px;
    padding-top: 8px;
}
.article-breadcrumb a { color: var(--text-muted); }
.article-breadcrumb a:hover { color: var(--accent); }
.breadcrumb-sep { color: var(--border-light); font-size: 11px; }

/* Two-column layout */
.article-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 40px;
    align-items: start;
}
.article-main { min-width: 0; }

/* Header */
.article-page-header { margin-bottom: 28px; }
.article-page-category {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}
.article-page-category a { color: var(--accent); }
.article-page-title {
    font-size: 34px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.5px;
    margin-bottom: 14px;
}
.article-page-excerpt {
    font-size: 18px;
    line-height: 1.5;
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-weight: 400;
}
.article-page-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-muted);
    flex-wrap: wrap;
}
.meta-sep { color: var(--border-light); }

/* Breaking flag */
.article-breaking-flag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(239,68,68,0.15), rgba(239,68,68,0.05));
    border: 1px solid rgba(239,68,68,0.3);
    border-radius: var(--radius);
    padding: 8px 16px;
    margin-bottom: 20px;
    font-size: 13px;
    font-weight: 700;
    color: var(--negative);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.breaking-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--negative);
    animation: pulse 1.5s infinite;
}

/* Hero image */
.article-page-image {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
}

/* Ticker chips bar */
.article-tickers-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-bottom: 28px;
    flex-wrap: wrap;
}
.article-tickers-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}
.article-tickers-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.article-ticker-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 12px;
    transition: border-color 0.15s, background 0.15s;
}
.article-ticker-chip:hover {
    border-color: var(--accent);
    background: var(--accent-light);
}
.chip-symbol {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--text-primary);
    font-size: 12px;
}
.chip-price {
    font-family: var(--font-mono);
    color: var(--text-secondary);
    font-size: 12px;
}
.chip-change {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 11px;
}
.chip-change.positive { color: var(--positive); }
.chip-change.negative { color: var(--negative); }

/* Article body content */
.article-content {
    font-size: 17px;
    line-height: 1.8;
    color: var(--text-secondary);
}
.article-content h2 { font-size: 24px; font-weight: 700; color: var(--text-primary); margin: 32px 0 16px; }
.article-content h3 { font-size: 20px; font-weight: 600; color: var(--text-primary); margin: 24px 0 12px; }
.article-content p { margin-bottom: 16px; }
.article-content ul, .article-content ol { margin-bottom: 16px; padding-left: 24px; }
.article-content li { margin-bottom: 8px; }
.article-content blockquote {
    border-left: 3px solid var(--accent);
    padding: 12px 20px;
    margin: 24px 0;
    background: var(--accent-light);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
}
.article-content a { color: var(--accent); }
.article-content strong { color: var(--text-primary); }

/* Article footer bar (tags + share) */
.article-footer-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-top: 32px;
    border-top: 1px solid var(--border);
    gap: 16px;
    flex-wrap: wrap;
}
.article-tags-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.article-tag {
    display: inline-block;
    padding: 4px 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: border-color 0.15s, color 0.15s;
}
.article-tag:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Share buttons */
.article-share {
    display: flex;
    align-items: center;
    gap: 8px;
}
.share-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
    font-size: 12px;
    font-family: var(--font-sans);
}
.share-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-light);
}

/* ── Article Sidebar ── */
.article-sidebar {
    position: sticky;
    top: calc(var(--ticker-height) + var(--nav-height) + 24px);
}

.sidebar-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 20px;
}
.sidebar-card-header {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}

/* Sidebar stock items */
.sidebar-stock-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    transition: background 0.1s;
}
.sidebar-stock-item:last-child { border-bottom: none; }
.sidebar-stock-item:hover { background: var(--bg-card-hover); }
.sidebar-stock-left { min-width: 0; }
.sidebar-stock-symbol {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}
.sidebar-stock-name {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}
.sidebar-stock-right { text-align: right; flex-shrink: 0; }
.sidebar-stock-price {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}
.sidebar-stock-change {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
}
.sidebar-stock-change.positive { color: var(--positive); }
.sidebar-stock-change.negative { color: var(--negative); }

/* Sidebar news items */
.sidebar-news-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    transition: background 0.1s;
}
.sidebar-news-item:last-child { border-bottom: none; }
.sidebar-news-item:hover { background: var(--bg-card-hover); }
.sidebar-news-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.sidebar-news-time {
    font-size: 11px;
    color: var(--text-muted);
}

/* Sidebar newsletter/CTA */
.sidebar-newsletter {
    padding: 20px 16px;
}
.sidebar-newsletter .sidebar-card-header {
    padding: 0 0 12px;
    border-bottom: none;
}
.sidebar-newsletter-text {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 14px;
}

/* ── Related Articles Section ── */
.article-related-section {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}
.related-grid .article-card-title { font-size: 14px; }

/* ── Search Page ── */
.search-page-input {
    width: 100%;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px 24px;
    color: var(--text-primary);
    font-size: 18px;
    font-family: var(--font-sans);
    outline: none;
    margin-bottom: 24px;
    transition: border-color 0.15s;
}
.search-page-input:focus { border-color: var(--accent); }

/* ── Pagination ── */
.pagination {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 32px;
}
.pagination a, .pagination span {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    transition: all 0.15s;
}
.pagination a:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.pagination .active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ── Error Page ── */
.error-page {
    text-align: center;
    padding: 80px 20px;
}
.error-code {
    font-family: var(--font-mono);
    font-size: 120px;
    font-weight: 800;
    color: var(--border);
    line-height: 1;
    margin-bottom: 16px;
}
.error-page h1 { font-size: 32px; font-weight: 700; margin-bottom: 12px; }
.error-page p { font-size: 16px; color: var(--text-secondary); margin-bottom: 32px; }
.error-actions { display: flex; gap: 12px; justify-content: center; }

/* ── Footer ── */
.site-footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    padding: 48px 0 24px;
    margin-top: 48px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 32px;
}
.footer-logo { font-size: 24px; font-weight: 800; display: inline-block; margin-bottom: 12px; }
.footer-tagline { font-size: 14px; color: var(--text-muted); line-height: 1.6; }
.footer-col h4 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-secondary); margin-bottom: 16px; }
.footer-col a { display: block; font-size: 14px; color: var(--text-muted); margin-bottom: 10px; transition: color 0.15s; }
.footer-col a:hover { color: var(--text-primary); }
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-muted);
}
.footer-disclaimer { font-size: 12px; }

/* ── News Page ── */
.news-header { margin-bottom: 24px; }
.category-tabs {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.category-tab {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    border: 1px solid var(--border);
    transition: all 0.15s;
}
.category-tab:hover { border-color: var(--border-light); color: var(--text-secondary); }
.category-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* ── Markets Page ── */
.market-section { margin-bottom: 40px; }

/* ── Static Pages ── */
.static-page { max-width: 820px; margin: 0 auto; }
.static-page h1 { font-size: 36px; font-weight: 800; margin-bottom: 24px; }
.static-page h2 { font-size: 24px; font-weight: 700; margin: 32px 0 16px; }
.static-page p { font-size: 16px; line-height: 1.8; color: var(--text-secondary); margin-bottom: 16px; }
.static-page ul { list-style: disc; padding-left: 24px; margin-bottom: 16px; }
.static-page li { font-size: 16px; color: var(--text-secondary); margin-bottom: 8px; }

/* ── Sidebar ── */
.content-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 32px;
}
.sidebar .card { margin-bottom: 20px; }

/* ── Sparkline Canvas ── */
canvas.sparkline { display: block; }

/* ── Watchlist empty ── */
.watchlist-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}
.watchlist-empty h2 { font-size: 24px; color: var(--text-primary); margin-bottom: 12px; }
.watchlist-empty p { font-size: 14px; margin-bottom: 24px; }

/* ── Add to watchlist btn ── */
.watchlist-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    transition: all 0.15s;
}
.watchlist-btn:hover { border-color: var(--accent); color: var(--accent); }
.watchlist-btn.active { background: var(--accent-light); border-color: var(--accent); color: var(--accent); }

/* ── Admin edit link ── */
.admin-edit-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--warning);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    background: rgba(245,158,11,0.1);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .hero-grid { grid-template-columns: 1fr; }
    .content-with-sidebar { grid-template-columns: 1fr; }
    .article-layout { grid-template-columns: 1fr; gap: 32px; }
    .article-sidebar { position: static; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
    .news-grid { grid-template-columns: repeat(2, 1fr); }
    .heatmap-grid { grid-template-columns: repeat(3, 1fr); }
    .heatmap-grid .heatmap-cell:nth-child(1),
    .heatmap-grid .heatmap-cell:nth-child(2) { grid-column: span 1; }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .calendar-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .nav-links { display: none; position: absolute; top: var(--nav-height); left: 0; right: 0; background: var(--bg-card); border-bottom: 1px solid var(--border); flex-direction: column; padding: 12px; }
    .nav-links.active { display: flex; }
    .nav-toggle { display: flex; }
    .nav-search { width: 180px; }
    .market-status { display: none; }
    .news-grid { grid-template-columns: 1fr; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .heatmap-grid { grid-template-columns: repeat(2, 1fr); }
    .article-page-title { font-size: 26px; }
    .article-page-excerpt { font-size: 16px; }
    .article-footer-bar { flex-direction: column; align-items: flex-start; }
    .stock-header { flex-direction: column; gap: 16px; }
    .stock-price-section { text-align: left; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
    .indices-grid { grid-template-columns: repeat(2, 1fr); }
    .calendar-grid { grid-template-columns: 1fr; }
    .stock-stats-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .container { padding: 0 12px; }
    .heatmap-grid { grid-template-columns: 1fr; }
    .indices-grid { grid-template-columns: 1fr; }
    .trending-tabs { flex-wrap: wrap; }
}

/* ── Empty States ── */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}
.empty-state p { margin-bottom: 12px; }

/* ── Tags ── */
.tag {
    display: inline-block;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
}
.tag-earnings { background: rgba(59,130,246,0.1); color: var(--accent); }
.tag-dividend { background: rgba(16,185,129,0.1); color: var(--positive); }
.tag-ipo { background: rgba(245,158,11,0.1); color: var(--warning); }
.tag-split { background: rgba(139,92,246,0.1); color: #8b5cf6; }

/* ── Contact Form ── */
.contact-form { max-width: 600px; }
.form-success {
    background: var(--positive-bg);
    border: 1px solid var(--positive);
    border-radius: var(--radius);
    padding: 16px 20px;
    color: var(--positive);
    margin-bottom: 20px;
}

/* ── Loading ── */
.loading-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Misc ── */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
