/**
 * TheWhisperNumber.com - Complete Stylesheet v2.0
 * Mobile-responsive, modern dark theme with gold accent
 * Features: Sparklines, animated whisper cards, mobile-first design
 */

/* ===========================
   CSS Variables
   =========================== */

:root {
    /* Updated Color System */
    --bg-primary: #0a0f1a;
    --bg-secondary: #111827;
    --bg-tertiary: #1a2332;
    --bg-hover: #1f2937;
    
    --text-primary: #e5e7eb;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    --border: #1f2937;
    --border-subtle: #1a2332;
    
    --accent: #F59E0B;
    --accent-hover: #fbbf24;
    --accent-dim: rgba(245, 158, 11, 0.1);
    --accent-glow: rgba(245, 158, 11, 0.5);
    
    --link-color: var(--text-secondary);
    --link-hover: var(--text-primary);
    
    --green: #10B981;
    --green-bg: rgba(16, 185, 129, 0.1);
    --red: #EF4444;
    --red-bg: rgba(239, 68, 68, 0.1);
    
    /* Typography */
    --font-main: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Spacing (8px base unit) */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    
    /* Layout */
    --container-width: 1400px;
    --sidebar-width: 380px;
    
    /* Border Radius */
    --radius-card: 8px;
    --radius-badge: 4px;
}

/* ===========================
   Reset & Base
   =========================== */

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

body {
    font-family: var(--font-main);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

/* ===========================
   Tabular Numbers
   =========================== */

.tabnum,
td[class*="tabnum"],
.earnings-table td:nth-child(n+3),
.historical-table td:nth-child(n+3),
.historical-table-enhanced td:nth-child(n+3),
.ticker-price,
.ticker-change,
.estimate-value,
.spread-badge,
.market-price,
.market-change,
.market-summary-change,
.ticker-price-large,
.ticker-change-large,
.stat-value {
    font-variant-numeric: tabular-nums;
}

/* ===========================
   Header (sticky)
   =========================== */

header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 14px 0;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 24px;
}

.logo {
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.logo-icon {
    width: 24px;
    height: 24px;
    color: var(--accent);
    flex-shrink: 0;
}

.logo-main {
    color: var(--text-primary);
}

.logo-whisper {
    color: var(--accent);
}

/* Search Box */
.search-box {
    flex: 1;
    max-width: 600px;
    display: flex;
    position: relative;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-badge);
    overflow: visible;
    position: relative;
    transition: all 0.2s ease;
}

.search-box:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
}

.search-box input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 10px 14px;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-box button {
    background: transparent;
    border: none;
    padding: 10px 14px;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: color 0.2s ease;
}

.search-box button:hover {
    color: var(--accent);
}

/* Search Autocomplete Dropdown */
.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius-badge) var(--radius-badge);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.search-dropdown-item {
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
    border-left: 3px solid transparent;
}

.search-dropdown-item:hover {
    background: var(--bg-hover);
    border-left-color: var(--accent);
}

.search-dropdown-item:not(:last-child) {
    border-bottom: 1px solid var(--border-subtle);
}

.search-dropdown-symbol {
    font-weight: 700;
    color: var(--text-primary);
    min-width: 60px;
}

.search-dropdown-name {
    flex: 1;
    color: var(--text-secondary);
    font-size: 13px;
}

/* Header Right */
.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
}

.market-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-badge);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--red);
}

.market-status.open .status-dot {
    background: var(--green);
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
    animation: pulse 2s infinite;
}

.market-status.premarket .status-dot,
.market-status.afterhours .status-dot {
    background: var(--accent);
    box-shadow: 0 0 6px var(--accent-glow);
}

.market-status.closed .status-dot {
    background: var(--red);
}

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

/* ===========================
   Ticker Tape
   =========================== */





.ticker-symbol {
    color: var(--text-muted);
    font-weight: 600;
    margin-right: 6px;
}

.ticker-price {
    color: var(--text-primary);
    margin-right: 6px;
}

.ticker-change {
    font-size: 12px;
    font-weight: 600;
}

.ticker-change.positive {
    color: var(--green);
}

.ticker-change.negative {
    color: var(--red);
}

.ticker-change.neutral {
    color: var(--text-muted);
}

/* ===========================
   Market Bar
   =========================== */

.market-bar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
}

.market-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.market-summary {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.market-summary-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
}

.market-summary-divider {
    color: var(--border);
    font-size: 12px;
}

.market-summary-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    transition: opacity 0.2s ease;
}

.market-summary-item:hover {
    opacity: 0.8;
}

.market-summary-name {
    color: var(--text-secondary);
    font-weight: 500;
}

.market-summary-change {
    font-weight: 600;
    font-size: 12px;
}

.market-summary-change.positive {
    color: var(--green);
}

.market-summary-change.negative {
    color: var(--red);
}

.market-summary-count {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ===========================
   Trending Bar
   =========================== */

.trending-bar {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
}

.trending-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.trending-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.trending-tickers {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.trending-ticker {
    padding: 4px 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    color: var(--text-secondary);
}

.trending-ticker:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-1px);
}

/* ===========================
   Main Layout Grid
   =========================== */

main {
    padding: 24px 0 48px;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr var(--sidebar-width);
    gap: 24px;
}

/* ===========================
   Section Cards
   =========================== */

.section {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    padding: 20px;
    margin-bottom: 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.section:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

.section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.section-link {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s ease;
    font-weight: 500;
}

.section-link:hover {
    color: var(--accent);
}

/* ===========================
   Whisper of the Day (REDESIGNED)
   =========================== */

.hero-whisper {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    padding: 32px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Featured Whisper Card - Enhanced */

/* ============================================================
   WHISPER OF THE DAY v2 - Hero Section
   ============================================================ */
.wotd-hero {
    position: relative;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    overflow: hidden;
}
.wotd-hero::before { display: none; }
.wotd-hero > * { position: relative; z-index: 1; }

.wotd-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.wotd-badge {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent);
}
.wotd-report-pill {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    padding: 5px 14px;
    border-radius: 20px;
}

/* Header row: ticker info left, chart right */
.wotd-header-row {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    align-items: stretch;
    margin-bottom: 24px;
}
.wotd-ticker-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: center;
}
.wotd-ticker-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: opacity 0.15s;
}
.wotd-ticker-link:hover { opacity: 0.85; }
.wotd-ticker-info { display: flex; flex-direction: column; }
.wotd-symbol {
    font-size: 28px;
    font-weight: 900;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    line-height: 1.1;
}
.wotd-company {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}
.wotd-quote {
    display: flex;
    align-items: baseline;
    gap: 10px;
}
.wotd-price {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.3px;
}
.wotd-change {
    font-size: 14px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.wotd-report-date-line {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Chart area */
.wotd-chart-area {
    min-height: 180px;
    max-height: 220px;
    position: relative;
    min-width: 0;
    overflow: hidden;
}
#wotdChart {
    width: 100% !important;
    height: 100% !important;
    max-width: 100%;
}

/* Numbers row */
.wotd-numbers {
    display: flex;
    align-items: center;
    gap: 0;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
}
.wotd-num-block {
    flex: 1;
    padding: 16px 20px;
    text-align: center;
    border-right: 1px solid var(--border);
}
.wotd-num-block:last-child { border-right: none; }
.wotd-num-whisper {
    background: rgba(245,158,11,0.02);
}
.wotd-num-spread {
    flex: 0 0 auto;
    min-width: 100px;
}
.wotd-num-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 6px;
}
.wotd-num-value {
    font-size: 26px;
    font-weight: 900;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.5px;
}
.wotd-gold {
    color: #F59E0B;
    text-shadow: none;
}
.wotd-num-divider {
    flex: 0 0 auto;
    padding: 0 4px;
    color: var(--text-muted);
    opacity: 0.3;
}

/* EPS visual bar */
.wotd-eps-visual {
    display: none;
}
.wotd-bar-track {
    position: relative;
    height: 6px;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
    margin-top: 28px;
    margin-bottom: 8px;
}
.wotd-bar-fill {
    position: absolute;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(139,148,158,0.3), rgba(245,158,11,0.5));
    border-radius: 3px;
}
.wotd-bar-marker {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
}
.wotd-bar-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--text-secondary);
    border: 2px solid #0c1118;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.1);
}
.wotd-bar-dot.gold {
    background: #F59E0B;
    box-shadow: 0 0 0 1px rgba(245,158,11,0.3);
}
.wotd-bar-tag {
    position: absolute;
    top: -22px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    white-space: nowrap;
}
.wotd-bar-tag.gold { color: #F59E0B; }

/* Bottom: history + CTA */
.wotd-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.wotd-history { flex: 1; }
.wotd-hist-title {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 6px;
}
.wotd-hist-row {
    display: flex;
    gap: 6px;
}
.wotd-q {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}
.wotd-q.beat { border-color: rgba(63,185,80,0.2); }
.wotd-q.miss { border-color: rgba(248,81,73,0.2); }
.wotd-q-name {
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}
.wotd-q-eps {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: var(--text-primary);
}
.wotd-q-pct {
    font-variant-numeric: tabular-nums;
    font-size: 10px;
}
.wotd-q.beat .wotd-q-pct { color: var(--green); }
.wotd-q.miss .wotd-q-pct { color: var(--red); }
.wotd-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: rgba(245,158,11,0.12);
    color: #F59E0B;
    font-size: 13px;
    font-weight: 700;
    border: 1px solid rgba(245,158,11,0.25);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}
.wotd-cta:hover {
    background: rgba(245,158,11,0.2);
    border-color: rgba(245,158,11,0.4);
    transform: translateY(-1px);
}

/* WOTD Mobile */
@media (max-width: 768px) {
    .wotd-hero { padding: 16px; }
    .wotd-header-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .wotd-chart-area { min-height: 150px; max-height: 180px; }
    .wotd-symbol { font-size: 22px; }
    .wotd-price { font-size: 20px; }
    .wotd-numbers { flex-wrap: wrap; }
    .wotd-num-block { min-width: 0; padding: 12px; }
    .wotd-num-value { font-size: 20px; }
    .wotd-num-divider { display: none; }
    .wotd-bottom { flex-direction: column; align-items: stretch; gap: 12px; }
    .wotd-hist-row { flex-wrap: wrap; }
    .wotd-cta { text-align: center; justify-content: center; }
    .wotd-eps-visual { padding: 0 8px; }
    .wotd-topbar { flex-wrap: wrap; gap: 8px; }
}


.whisper-featured::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg, var(--accent), #d97706, var(--accent));
    border-radius: var(--radius-card);
    z-index: -1;
    animation: gradientRotate 6s linear infinite;
    opacity: 0.6;
}

@keyframes borderPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(245, 158, 11, 0.3); }
    50% { box-shadow: 0 0 40px rgba(245, 158, 11, 0.5); }
}

@keyframes gradientRotate {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

.hero-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.hero-badge {
    display: inline-block;
    background: var(--accent-dim);
    color: var(--accent);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.hero-symbol {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: color 0.2s ease;
}

a.hero-symbol:hover {
    color: var(--accent);
}

.hero-company {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.hero-comparison {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    margin-top: 20px;
}

.hero-divider {
    display: flex;
    align-items: center;
    color: var(--text-muted);
}

.hero-spread {
    margin-top: 16px;
}

.estimate-box {
    flex: 1;
    max-width: 180px;
}

.estimate-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    font-weight: 600;
}

.estimate-value {
    font-size: 28px;
    font-weight: 800;
}

.estimate-value.whisper {
    color: var(--accent);
    font-size: 36px;
    text-shadow: 0 0 20px var(--accent-glow);
    animation: whisperGlow 2s ease-in-out infinite;
}

@keyframes whisperGlow {
    0%, 100% { 
        text-shadow: 0 0 20px var(--accent-glow);
        transform: scale(1);
    }
    50% { 
        text-shadow: 0 0 30px var(--accent-glow), 0 0 40px rgba(245, 158, 11, 0.3);
        transform: scale(1.02);
    }
}

.vs-text {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-muted);
}

/* ===========================
   Tabs
   =========================== */

.tabs {
    display: flex;
    gap: 2px;
    background: var(--bg-primary);
    padding: 4px;
    border-radius: var(--radius-badge);
    margin-bottom: 16px;
}

.tab {
    flex: 1;
    padding: 8px 16px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border-radius: var(--radius-badge);
    transition: all 0.2s ease;
}

.tab:hover {
    color: var(--text-primary);
}

.tab.active {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* ===========================
   Sparkline Styles
   =========================== */

.sparkline-cell {
    padding: 8px !important;
    vertical-align: middle;
}

.sparkline-cell svg {
    display: block;
    width: 120px;
    height: 32px;
    margin: 0;
    padding: 0;
    vertical-align: middle;
}

.sparkline-inline {
    display: inline-block;
    width: 80px;
    height: 24px;
    margin-left: 8px;
    vertical-align: middle;
}

/* ===========================
   Earnings List (Compact Cards)
   =========================== */

.earnings-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.earnings-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-badge);
    transition: all 0.2s ease;
    cursor: pointer;
}

.earnings-item:hover {
    border-color: var(--accent);
    background: var(--bg-hover);
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.earnings-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.earnings-symbol {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.earnings-company {
    font-size: 12px;
    color: var(--text-muted);
}

.earnings-date {
    font-size: 12px;
    color: var(--text-secondary);
    margin-left: auto;
    padding-right: 12px;
}

.earnings-time-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--radius-badge);
    margin-left: 6px;
}

.earnings-time-badge.amc {
    background: rgba(59, 130, 246, 0.15);
    color: #60A5FA;
}

.earnings-time-badge.bmo {
    background: rgba(168, 85, 247, 0.15);
    color: #C084FC;
}

.earnings-estimates {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: right;
}

.consensus-value {
    font-size: 13px;
    color: var(--text-secondary);
}

.whisper-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--accent);
}

.spread-badge {
    font-size: 13px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-badge);
    margin-left: 12px;
    white-space: nowrap;
}

.spread-badge.positive {
    color: var(--green);
    background: var(--green-bg);
}

.spread-badge.negative {
    color: var(--red);
    background: var(--red-bg);
}

/* ===========================
   Result Badges (Improved)
   =========================== */

.result-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    display: inline-block;
}

.result-badge.beat {
    color: var(--green);
    background: var(--green-bg);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.result-badge.miss {
    color: var(--red);
    background: var(--red-bg);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.result-badge.meet {
    color: var(--accent);
    background: var(--accent-dim);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* ===========================
   Tables (Sticky Headers)
   =========================== */

.earnings-table,
.historical-table,
.historical-table-enhanced {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.earnings-table thead,
.historical-table thead,
.historical-table-enhanced thead {
    background: var(--bg-primary);
    position: sticky;
    top: 0;
    z-index: 10;
}

.earnings-table th,
.historical-table th,
.historical-table-enhanced th {
    padding: 12px 14px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border);
    background: var(--bg-primary);
}

/* Right-align number columns */
.earnings-table th:nth-child(n+3),
.historical-table th:nth-child(n+3),
.historical-table-enhanced th:nth-child(n+3) {
    text-align: right;
}

.earnings-table td:nth-child(n+3),
.historical-table td:nth-child(n+3),
.historical-table-enhanced td:nth-child(n+3) {
    text-align: right;
}

.earnings-table tbody tr,
.historical-table tbody tr,
.historical-table-enhanced tbody tr {
    border-bottom: 1px solid var(--border-subtle);
    transition: all 0.15s ease;
}

/* Zebra striping */
.earnings-table tbody tr:nth-child(odd),
.historical-table tbody tr:nth-child(odd),
.historical-table-enhanced tbody tr:nth-child(odd) {
    background: rgba(255, 255, 255, 0.02);
}

.earnings-table tbody tr:hover,
.historical-table tbody tr:hover,
.historical-table-enhanced tbody tr:hover {
    background: rgba(245, 158, 11, 0.08);
    transform: scale(1.002);
}

.earnings-table td,
.historical-table td,
.historical-table-enhanced td {
    padding: 14px;
    font-size: 13px;
}

.table-symbol {
    font-weight: 700;
    color: var(--text-primary);
}

.table-company {
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-secondary);
    font-size: 12px;
    display: block;
    margin-top: 2px;
}

.table-whisper {
    color: var(--accent);
    font-weight: 700;
    font-size: 14px;
}

/* Enhanced Historical Table */
.actual-eps-cell {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
}

.surprise-pct {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 8px;
}

.surprise-pct.positive {
    color: var(--green);
    background: var(--green-bg);
}

.surprise-pct.negative {
    color: var(--red);
    background: var(--red-bg);
}

/* ===========================
   Calendar Grid
   =========================== */

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.calendar-day {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 200px;
    max-height: 800px;
    transition: all 0.2s ease;
}

.calendar-day:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.calendar-day.today {
    border-left: 4px solid var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
}

.calendar-day-header {
    background: var(--bg-tertiary);
    padding: 14px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.calendar-day.today .calendar-day-header {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0.08) 100%);
    border-bottom-color: rgba(245, 158, 11, 0.3);
}

.calendar-day-name {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.calendar-day-date {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.calendar-count-badge {
    display: inline-block;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 12px;
    min-width: 28px;
    text-align: center;
}

.calendar-day.today .calendar-count-badge {
    background: var(--accent-dim);
    border-color: var(--accent);
    color: var(--accent);
}

.calendar-today-badge {
    display: inline-block;
    background: var(--accent);
    color: #000;
    font-size: 9px;
    font-weight: 800;
    padding: 3px 7px;
    border-radius: 3px;
    letter-spacing: 0.3px;
}

.calendar-day-content {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    overflow-x: hidden;
}

.calendar-day-content::-webkit-scrollbar {
    width: 6px;
}

.calendar-day-content::-webkit-scrollbar-track {
    background: transparent;
}

.calendar-day-content::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.calendar-day-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Calendar Time Sections */
.calendar-time-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.calendar-time-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 8px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-badge);
    margin-bottom: 2px;
}

.calendar-time-count {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    background: var(--bg-primary);
    padding: 2px 6px;
    border-radius: 3px;
}

.calendar-companies-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Company Cards in Calendar */
.calendar-company-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: var(--bg-primary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-badge);
    transition: all 0.2s ease;
    text-decoration: none;
    cursor: pointer;
}

.calendar-company-card:hover {
    background: var(--bg-hover);
    border-color: var(--border);
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.calendar-company-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.calendar-company-symbol {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.2px;
}

.calendar-company-meta {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.whisper-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: var(--accent-dim);
    border: 1px solid var(--accent);
    color: var(--accent);
    font-size: 9px;
    font-weight: 800;
    border-radius: 3px;
    cursor: help;
}

/* Calendar Empty State */
.calendar-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 48px 16px;
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
    flex: 1;
}

/* Calendar Navigation */
.calendar-week-summary {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.calendar-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cal-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-badge);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.cal-nav-btn:hover {
    border-color: var(--accent);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.cal-nav-today {
    padding: 0 16px;
    font-size: 13px;
    font-weight: 600;
    background: var(--accent-dim);
    border-color: var(--accent);
    color: var(--accent);
}

.cal-nav-today:hover {
    background: var(--accent);
    color: #000;
}

.cal-nav-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    padding: 0 12px;
    white-space: nowrap;
}

/* Calendar Legend */
.calendar-legend {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    font-size: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
}

/* ===========================
   Filter Bar & Chips
   =========================== */

.filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.filter-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-chip {
    padding: 6px 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.filter-chip:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.filter-chip.active {
    background: var(--accent-dim);
    border-color: var(--accent);
    color: var(--accent);
    font-weight: 600;
}

/* ===========================
   Compare Page Styles
   =========================== */

.compare-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.compare-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    padding: 16px;
    transition: all 0.2s ease;
}

.compare-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.compare-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle);
}

.compare-card-symbol {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.compare-card-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.compare-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.compare-metric-label {
    font-size: 12px;
    color: var(--text-muted);
}

.compare-metric-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

/* ===========================
   Movers Grid
   =========================== */

.movers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.movers-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    padding: 16px;
}

.movers-section-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-subtle);
}

/* ===========================
   Search Results
   =========================== */

.search-results {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-badge);
    transition: all 0.2s ease;
    cursor: pointer;
}

.search-result-item:hover {
    border-color: var(--accent);
    background: var(--bg-hover);
    transform: translateX(2px);
}

.search-result-symbol {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    min-width: 80px;
}

.search-result-name {
    flex: 1;
    color: var(--text-secondary);
    font-size: 13px;
}

.search-result-meta {
    font-size: 12px;
    color: var(--text-muted);
}

/* ===========================
   Articles Grid
   =========================== */

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.article-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-badge);
    padding: 16px;
    display: flex;
    gap: 12px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.article-card:hover {
    background: var(--bg-hover);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.article-logo {
    flex-shrink: 0;
}

.article-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.article-headline {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
}

.article-summary {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.article-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ===========================
   Market Indicators Dashboard
   =========================== */

.indicators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.indicator-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-badge);
    padding: 16px;
    text-align: center;
    transition: all 0.2s ease;
}

.indicator-card:hover {
    background: var(--bg-hover);
    transform: translateY(-2px);
}

.indicator-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.indicator-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.indicator-value.positive {
    color: var(--green);
}

.indicator-value.negative {
    color: var(--red);
}

.indicator-sublabel {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ===========================
   Ticker Page Enhancements
   =========================== */

.ticker-header-enhanced {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
    gap: 32px;
}

.ticker-symbol-large {
    font-size: 40px;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ticker-price-section {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.ticker-price-large {
    font-size: 48px;
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1;
}

.ticker-change-large {
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.quote-stats {
    display: flex;
    gap: 24px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-subtle);
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.countdown-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: var(--accent-dim);
    color: var(--accent);
    border-radius: var(--radius-badge);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.next-earnings-card {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.earnings-meta {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.meta-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.meta-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.comparison-boxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.comparison-box {
    padding: 20px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    text-align: center;
}

.comparison-box.whisper-box {
    border-color: var(--accent);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05) 0%, var(--bg-primary) 100%);
}

.insight-box {
    padding: 16px;
    background: var(--bg-primary);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius-badge);
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.6;
}

.insight-box strong {
    color: var(--text-primary);
}

/* Chart range buttons */
.chart-range-buttons {
    display: flex;
    gap: 4px;
}

.chart-range-buttons .tab {
    padding: 6px 12px;
    font-size: 12px;
}

/* ===========================
   Utility Classes
   =========================== */

.positive {
    color: var(--green) !important;
}

.negative {
    color: var(--red) !important;
}

.neutral {
    color: var(--text-muted) !important;
}

/* ===========================
   RESPONSIVE - MOBILE (CRITICAL)
   =========================== */

/* Tablet: 768px breakpoint */
@media (max-width: 768px) {
    /* Header - Stack search below logo */
    .header-content {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .logo {
        order: 1;
        font-size: 16px;
    }
    
    .logo-icon {
        width: 20px;
        height: 20px;
    }
    
    .header-right {
        order: 2;
        margin-left: auto;
    }
    
    .search-box {
        order: 3;
        width: 100%;
        max-width: 100%;
    }
    
    /* Ticker tape - slower on mobile, smaller font */
    .ticker-tape {
        font-size: 12px;
        height: 28px;
    }
    
    .ticker-tape-track {
        animation-duration: 60s;
    }
    
    .ticker-item {
        padding: 0 12px;
    }
    
    /* Market bar - stack on mobile */
    .market-summary {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    /* Content grid - stack sidebar below main */
    .content-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .sidebar {
        order: 2;
    }
    
    /* Calendar - 2-3 columns on tablet */
    .calendar-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 12px;
    }
    
    /* Calendar navigation - wrap */
    .calendar-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .cal-nav-label {
        order: -1;
        width: 100%;
        text-align: center;
        padding-bottom: 8px;
    }
    
    /* Cards - full width, less padding */
    .section {
        padding: 16px;
    }
    
    /* Tables - reduce font size */
    .earnings-table td,
    .historical-table td,
    .historical-table-enhanced td {
        padding: 10px 8px;
        font-size: 12px;
    }
    
    .earnings-table th,
    .historical-table th,
    .historical-table-enhanced th {
        padding: 10px 8px;
        font-size: 10px;
    }
    
    .actual-eps-cell {
        font-size: 14px;
    }
    
    /* Hero whisper - reduce sizes */
    .hero-symbol {
        font-size: 24px;
    }
    
    .estimate-value {
        font-size: 24px;
    }
    
    .estimate-value.whisper {
        font-size: 28px;
    }
    
    /* Ticker header */
    .ticker-header-enhanced {
        flex-direction: column;
        gap: 20px;
    }
    
    .ticker-symbol-large {
        font-size: 32px;
    }
    
    .ticker-price-section {
        align-items: flex-start;
        text-align: left;
    }
    
    .ticker-price-large {
        font-size: 36px;
    }
    
    .ticker-change-large {
        font-size: 16px;
    }
    
    .quote-stats {
        flex-wrap: wrap;
        gap: 16px;
    }
    
    /* Indicators grid - 2 columns */
    .indicators-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Articles - single column */
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    /* Compare grid - responsive */
    .compare-grid {
        grid-template-columns: 1fr;
    }
    
    /* Movers grid - single column */
    .movers-grid {
        grid-template-columns: 1fr;
}    /* Hide sparkline column on mobile */    .earnings-table th:nth-child(2),    .earnings-table td:nth-child(2) {        display: none;    }    /* Footer grid - stack sections */    .footer-grid {        grid-template-columns: 1fr;        gap: 24px;
    }
}

/* Mobile: 480px breakpoint (compact mode) */
@media (max-width: 480px) {
    /* Further reduce spacing */
    .container {
        padding: 0 12px;
    }
    
    main {
        padding: 16px 0 32px;
    }
    
    .section {
        padding: 12px;
        margin-bottom: 16px;
    }
    
    /* Compact header */
    header {
        padding: 10px 0;
    }
    
    .logo {
        font-size: 14px;
        gap: 6px;
    }
    
    .logo-icon {
        width: 18px;
        height: 18px;
    }
    
    .market-status {
        padding: 6px 10px;
        font-size: 11px;
    }
    
    /* Ticker tape - very slow on small mobile */
    .ticker-tape {
        font-size: 11px;
        height: 24px;
    }
    
    .ticker-tape-track {
        animation-duration: 80s;
    }
    
    /* Calendar - single column */
    .calendar-grid {
        grid-template-columns: 1fr;
    }
    
    .calendar-day {
        max-height: 500px;
    }
    
    .calendar-company-card {
        padding: 12px;
    }
    
    /* Tables - horizontal scroll wrapper */
    .earnings-table,
    .historical-table,
    .historical-table-enhanced {
        min-width: 600px;
    }
    
    .earnings-table td,
    .historical-table td,
    .historical-table-enhanced td {
        padding: 8px 6px;
        font-size: 11px;
    }
    
    .earnings-table th,
    .historical-table th,
    .historical-table-enhanced th {
        padding: 8px 6px;
        font-size: 9px;
    }
    
    /* Hide non-essential table columns on mobile */
    .earnings-table td:nth-child(2),
    .earnings-table th:nth-child(2) {
        display: none;
    }
    
    /* Movers table mobile - ensure 1D MOVE column is visible */
    .movers-table {
        font-size: 12px;
    }
    
    .movers-table th,
    .movers-table td {
        padding: 8px 6px;
    }
    
    /* Market Snapshot 2x2 grid on mobile */
    .indicators-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .indicator-card {
        padding: 12px;
    }
    
    .indicator-value {
        font-size: 20px;
    }
    
    /* Action buttons stack on mobile */
    .action-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .action-buttons a {
        text-align: center;
    }
    
    /* Smaller badges and buttons */
    .spread-badge {
        font-size: 11px;
        padding: 3px 8px;
    }
    
    .result-badge {
        font-size: 10px;
        padding: 3px 8px;
    }
    
    .filter-chip {
        font-size: 11px;
        padding: 5px 10px;
    }
    
    /* Compact cards */
    .earnings-item {
        padding: 10px;
        gap: 8px;
    }
    
    .earnings-symbol {
        font-size: 13px;
    }
    
    .earnings-company {
        font-size: 11px;
    }
    
    /* Hero whisper - mobile optimized */
    .hero-whisper {
        padding: 20px 16px;
    }
    
    .hero-symbol {
        font-size: 20px;
    }
    
    .hero-company {
        font-size: 12px;
    }
    
    .hero-comparison {
        flex-direction: column;
        gap: 12px;
    }
    
    .estimate-box {
        max-width: 100%;
    }
    
    .estimate-value {
        font-size: 20px;
    }
    
    .estimate-value.whisper {
        font-size: 24px;
    }
    
    /* Ticker page - compact */
    .ticker-symbol-large {
        font-size: 24px;
    }
    
    .ticker-price-large {
        font-size: 28px;
    }
    
    .ticker-change-large {
        font-size: 14px;
    }
    
    .quote-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    /* Section headers - smaller */
    .section-title {
        font-size: 14px;
    }
    
    .section-link {
        font-size: 12px;
    }
    
    /* Indicators - single column on very small screens */
    .indicators-grid {
        grid-template-columns: 1fr;
    }
    
    /* Filter bar - full width chips */
    .filter-bar {
        padding: 10px;
    }
    
    .filter-chips {
        width: 100%;
    }
    
    .filter-chip {
        flex: 1;
        text-align: center;
    }
}

/* Landscape mobile - adjust height constraints */
@media (max-width: 768px) and (orientation: landscape) {
    .calendar-day {
        max-height: 400px;
    }
}

/* Very large screens - constrain max widths */
@media (min-width: 1600px) {
    :root {
        --container-width: 1600px;
    }
}

/* Print styles */
@media print {
    header,
    .ticker-tape,
    .market-bar,
    .trending-bar,
    .sidebar,
    .section-link,
    .calendar-nav {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .section {
        page-break-inside: avoid;
        border: 1px solid #ccc;
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .ticker-tape-track {
        animation: none;
    }
    
    .estimate-value.whisper {
        animation: none;
    }
}

/* ===========================
   Footer Styles
   =========================== */

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-bottom: 24px;
}

.footer-section a {
    display: block;
    color: var(--text-secondary);
    font-size: 13px;
    padding: 4px 0;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: var(--accent);
}

.footer-heading {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 8px;
}

.footer-tagline {
    font-size: 12px;
    color: var(--text-muted);
}

.footer-bottom {
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
}

.footer-disclaimer {
    font-size: 11px;
    margin-top: 8px;
    opacity: 0.7;
}

footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 40px 0 24px;
    margin-top: 48px;
}

/* ===========================
   Action Buttons
   =========================== */

.action-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}


/* ===========================
   Whisper Featured Card (Homepage)
   =========================== */
.whisper-featured {
    background: linear-gradient(135deg, #1a1f2e 0%, #0f1419 100%);
    border: 2px solid transparent;
    background-image:
        linear-gradient(135deg, #1a1f2e 0%, #0f1419 100%),
        linear-gradient(135deg, var(--accent) 0%, #d97706 100%);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    border-radius: var(--radius);
    padding: 32px 28px;
    text-align: center;
}
.featured-badge {
    display: inline-block;
    background: var(--accent-dim);
    color: var(--accent);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    padding: 6px 14px;
    border-radius: 16px;
    margin-bottom: 20px;
}
.featured-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 12px;
    text-decoration: none;
    transition: transform 0.2s;
}
.featured-header:hover { transform: scale(1.02); }
.featured-symbol { font-size: 32px; font-weight: 900; color: var(--text-primary); letter-spacing: -0.5px; }
.featured-company { font-size: 14px; color: var(--text-secondary); font-weight: 500; }
.featured-report-date { font-size: 13px; color: var(--text-muted); margin-bottom: 24px; font-weight: 600; }
.featured-comparison { display: flex; align-items: center; justify-content: center; gap: 24px; margin: 24px 0; }
.featured-arrow { color: var(--text-muted); opacity: 0.4; }
.featured-estimate-box { flex: 0 0 auto; min-width: 140px; }
.featured-estimate-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 8px; font-weight: 700; }
.featured-estimate-value { font-size: 36px; font-weight: 900; color: var(--text-primary); font-variant-numeric: tabular-nums; letter-spacing: -1px; }
.featured-whisper-glow { color: var(--accent); text-shadow: 0 0 20px rgba(245,158,11,0.5), 0 0 40px rgba(245,158,11,0.2); }
.featured-spread { margin-top: 20px; }
.featured-spread-badge { display: inline-block; font-size: 16px; font-weight: 800; padding: 10px 24px; border-radius: var(--radius-sm); font-variant-numeric: tabular-nums; }
.featured-spread-badge.positive { background: var(--green-bg); color: var(--green); border: 1px solid rgba(63,185,80,0.4); }
.featured-spread-badge.negative { background: var(--red-bg); color: var(--red); border: 1px solid rgba(248,81,73,0.4); }



@media (max-width: 480px) {
    .featured-comparison { flex-direction: column; gap: 12px; }
    .featured-estimate-value { font-size: 28px; }
    .featured-symbol { font-size: 24px; }
    .featured-arrow { display: none; }
}

/* ===========================
   Action Buttons (Homepage)
   =========================== */
.action-buttons { display: flex; gap: 16px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
@media (max-width: 480px) {
    .action-buttons { flex-direction: column; align-items: stretch; }
    .action-buttons a { text-align: center; }
}

/* ===========================
   Footer Grid
   =========================== */
footer { background: var(--bg-secondary); border-top: 1px solid var(--border-color); padding: 40px 0 24px; margin-top: 48px; }
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-bottom: 24px; }
.footer-section a { display: block; color: var(--text-secondary); font-size: 13px; padding: 4px 0; transition: color 0.2s; }
.footer-section a:hover { color: var(--accent); }
.footer-heading { font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px; }
.footer-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; margin-bottom: 8px; color: var(--text-primary); }
.footer-tagline { font-size: 12px; color: var(--text-muted); }
.footer-bottom { padding-top: 20px; border-top: 1px solid var(--border-color); font-size: 12px; color: var(--text-muted); text-align: center; }
.footer-disclaimer { font-size: 11px; margin-top: 8px; opacity: 0.7; }
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr; gap: 24px; } }

/* ===========================
   Mobile: Hide sparkline column
   =========================== */
@media (max-width: 768px) {
    .earnings-table th:nth-child(2),
    .earnings-table td:nth-child(2) { display: none; }
    .content-grid { grid-template-columns: 1fr; }
    .sidebar { order: 2; }
}

/* ===========================
   Search Dropdown
   =========================== */
.search-dropdown { position: absolute; top: 100%; left: 0; right: 0; background: var(--bg-tertiary); border: 1px solid var(--border-color); border-top: none; border-radius: 0 0 6px 6px; max-height: 300px; overflow-y: auto; display: none; z-index: 1000; margin-top: -1px; box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
.search-dropdown-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; text-decoration: none; transition: background 0.15s; border-bottom: 1px solid var(--border-subtle); }
.search-dropdown-item:hover { background: var(--bg-hover); border-left: 3px solid var(--accent); }
.search-item-symbol { font-weight: 700; color: var(--text-primary); min-width: 60px; }
.search-item-name { color: var(--text-secondary); font-size: 12px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-item-sector { color: var(--text-muted); font-size: 11px; }


/* Market Indices Horizontal Bar */
.mkt-bar {
    background: #080b10;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.mkt-bar::-webkit-scrollbar { display: none; }
.mkt-bar-track {
    display: flex;
    align-items: stretch;
    min-width: min-content;
    margin: 0 auto;
    max-width: 1280px;
}
.mkt-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    text-decoration: none;
    white-space: nowrap;
    border-right: 1px solid rgba(255,255,255,0.04);
    flex: 1;
    min-width: 0;
    transition: background 0.15s;
}
.mkt-item:last-child { border-right: none; }
.mkt-item:hover { background: rgba(255,255,255,0.03); }
.mkt-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 52px;
}
.mkt-spark {
    width: 48px;
    height: 18px;
    flex-shrink: 0;
}
.mkt-val {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}
.mkt-chg {
    font-size: 12px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
@media (max-width: 768px) {
    .mkt-item { padding: 6px 10px; gap: 5px; flex: 0 0 auto; }
    .mkt-name { font-size: 11px; min-width: auto; }
    .mkt-val { font-size: 12px; }
    .mkt-chg { font-size: 11px; }
    .mkt-spark { width: 36px; height: 14px; }
}

/* ============================================================
   EARNINGS REPORT CARD
   ============================================================ */
.report-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px 24px;
    overflow: hidden;
}
.rc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.rc-badge {
    font-size: 13px;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.rc-badge.beat {
    background: rgba(63,185,80,0.1);
    color: var(--green);
    border: 1px solid rgba(63,185,80,0.25);
}
.rc-badge.missed {
    background: rgba(248,81,73,0.1);
    color: var(--red);
    border: 1px solid rgba(248,81,73,0.25);
}
.rc-badge.met {
    background: rgba(139,148,158,0.1);
    color: var(--text-secondary);
    border: 1px solid rgba(139,148,158,0.25);
}
.rc-date {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}
.rc-numbers {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 16px;
}
.rc-num {
    background: var(--bg-primary);
    padding: 14px 16px;
    text-align: center;
}
.rc-num-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 6px;
}
.rc-num-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.3px;
}
.rc-actual {
    color: var(--text-primary);
}
.rc-whisper {
    color: var(--accent);
}
.rc-num-delta {
    font-size: 12px;
    font-weight: 700;
    margin-top: 4px;
    font-variant-numeric: tabular-nums;
}
.rc-summary {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
}
.rc-summary p {
    margin: 0;
}

@media (max-width: 768px) {
    .rc-numbers { grid-template-columns: repeat(2, 1fr); }
    .rc-num-value { font-size: 18px; }
    .report-card { padding: 16px; }
    .rc-header { flex-direction: column; align-items: flex-start; }
}

/* Light Mode */
[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --bg-tertiary: #e8e8e8;
    --text-primary: #1a1a1a;
    --text-secondary: #4a4a4a;
    --text-muted: #6a6a6a;
    --border-color: #d0d0d0;
    --accent: #D97706;
    --accent-hover: #B45309;
    --positive: #059669;
    --negative: #DC2626;
    --card-bg: #ffffff;
    --hover-bg: rgba(0, 0, 0, 0.05);
}

/* Theme toggle button */
.theme-toggle {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    background: var(--hover-bg);
    border-color: var(--accent);
}

.theme-toggle svg {
    width: 16px;
    height: 16px;
}

/* Hide sun/moon based on theme */
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: inline; }
[data-theme="light"] .theme-toggle .icon-sun { display: inline; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* Default (dark) */
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: inline; }

/* Fix double border on WOTD - section wrapper provides outer styling */
.section > .wotd-hero {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
}
