/* TradeSignal AI - Tools Shared Design System */
:root {
    --gold-primary: #D4AF37;
    --gold-light: #F4D58D;
    --gold-dark: #B8960C;
    --bg-cream: #FAFAF8;
    --bg-white: #FFFFFF;
    --text-primary: #1A1A1A;
    --text-secondary: #5C5C5C;
    --text-tertiary: #8A8A8A;
    --border-light: rgba(212, 175, 55, 0.15);
    --green: #22C55E;
    --green-bg: #F0FDF4;
    --red: #EF4444;
    --red-bg: #FEF2F2;
    --blue: #3B82F6;
    --blue-bg: #EFF6FF;
    --radius: 14px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-cream);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ===== NAV HEADER (2-row: Investing.com style) ===== */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(250, 250, 248, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.site-nav.nav-hidden { transform: translateY(-100%); }
.site-nav.nav-scrolled { box-shadow: 0 2px 16px rgba(0,0,0,0.08); }

/* Spacer — matches nav total height (top row ~56px + bottom row ~40px) */
.nav-spacer { height: 100px; }

/* --- Row 1: Logo | Search | Get App --- */
.nav-top {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 16px;
    height: 56px;
    padding: 0 24px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    flex-shrink: 0;
}

.nav-logo-img { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; }

.nav-logo-text {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 19px;
    font-weight: 500;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.nav-top-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.nav-cta {
    background: var(--text-primary);
    color: white !important;
    padding: 7px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.nav-cta:hover {
    background: var(--gold-primary);
    transform: translateY(-1px);
}

/* --- Row 2: Navigation links --- */
.nav-bottom {
    border-top: 1px solid var(--border-light);
    background: rgba(250, 250, 248, 0.6);
}

.nav-links {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 24px;
    list-style: none;
    height: 40px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.nav-links::-webkit-scrollbar { display: none; }

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    transition: color 0.2s;
}

.nav-links a:hover { color: var(--gold-primary); }

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-shrink: 0;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    margin: 5px 0;
    transition: 0.3s;
}

@media (max-width: 768px) {
    .nav-toggle { display: block; }
    .nav-spacer { height: 56px; }
    .nav-top { gap: 10px; }
    .nav-top-right { display: none; }
    .nav-bottom {
        display: none;
        position: absolute;
        top: 56px;
        left: 0;
        right: 0;
        background: var(--bg-cream);
        border-bottom: 1px solid var(--border-light);
        box-shadow: var(--shadow-md);
        border-top: none;
    }
    .nav-bottom.open { display: block; }
    .nav-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        height: auto;
        padding: 8px 24px 16px;
        overflow: visible;
    }
    .nav-links li { width: 100%; }
    .nav-links a {
        display: block;
        padding: 10px 0;
        font-size: 15px;
        border-bottom: 1px solid var(--border-light);
    }
    .nav-links li:last-child a { border-bottom: none; }
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
    max-width: 800px;
    margin: 0 auto;
    padding: 16px 24px 0;
    font-size: 13px;
    color: var(--text-tertiary);
}

.breadcrumb a {
    color: var(--text-tertiary);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover { color: var(--gold-primary); }
.breadcrumb span { margin: 0 6px; }

/* ===== PAGE HERO ===== */
.tool-hero {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 24px 32px;
    text-align: center;
}

.tool-hero h1 {
    font-family: 'Fraunces', Georgia, serif;
    font-size: clamp(28px, 5vw, 42px);
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 12px;
}

.tool-hero p {
    font-size: 17px;
    color: var(--text-secondary);
    max-width: 540px;
    margin: 0 auto;
}

/* ===== CALCULATOR CARD ===== */
.calc-card {
    max-width: 560px;
    margin: 0 auto 48px;
    background: var(--bg-white);
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
    padding: 32px;
}

.calc-inputs {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #E5E5E5;
    border-radius: 10px;
    font-size: 16px;
    font-family: 'DM Sans', sans-serif;
    color: var(--text-primary);
    background: var(--bg-cream);
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 480px) {
    .input-row { grid-template-columns: 1fr; }
}

.calc-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    transition: all 0.25s;
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.3);
}

.calc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.4);
}

.calc-btn:active { transform: translateY(0); }

/* ===== RESULTS ===== */
.calc-results {
    display: none;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
}

.calc-results.visible { display: block; }

.result-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

@media (max-width: 480px) {
    .result-grid { grid-template-columns: 1fr; }
}

.result-item {
    text-align: center;
    padding: 16px 12px;
    background: var(--bg-cream);
    border-radius: 10px;
}

.result-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
}

.result-value {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 24px;
    font-weight: 500;
    color: var(--text-primary);
}

.result-value.positive { color: var(--green); }
.result-value.negative { color: var(--red); }
.result-value.neutral { color: var(--blue); }

/* Full-width result */
.result-full {
    grid-column: 1 / -1;
    padding: 16px;
    background: var(--bg-cream);
    border-radius: 10px;
}

/* Visual bar (risk/reward) */
.visual-bar-container {
    grid-column: 1 / -1;
    margin-top: 8px;
}

.visual-bar {
    display: flex;
    height: 32px;
    border-radius: 8px;
    overflow: hidden;
    background: #F0F0F0;
}

.visual-bar .bar-risk {
    background: var(--red);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: 600;
    min-width: 40px;
    transition: width 0.5s ease;
}

.visual-bar .bar-reward {
    background: var(--green);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: 600;
    min-width: 40px;
    transition: width 0.5s ease;
}

/* P&L indicator */
.pnl-indicator {
    grid-column: 1 / -1;
    height: 6px;
    border-radius: 3px;
    margin-top: 4px;
    transition: background 0.3s;
}

.pnl-indicator.profit { background: var(--green); }
.pnl-indicator.loss { background: var(--red); }

/* ===== CONTENT SECTIONS ===== */
.content-section {
    max-width: 700px;
    margin: 0 auto 40px;
    padding: 0 24px;
}

.content-section h2 {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 16px;
}

.content-section p {
    color: var(--text-secondary);
    margin-bottom: 12px;
}

/* How It Works - Steps */
.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 20px;
}

@media (max-width: 600px) {
    .steps { grid-template-columns: 1fr; }
}

.step {
    text-align: center;
    padding: 24px 16px;
    background: var(--bg-white);
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
}

.step-number {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-light));
    color: white;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 12px;
}

.step h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
}

.step p {
    font-size: 13px;
    color: var(--text-tertiary);
}

/* ===== FAQ ACCORDION ===== */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.faq-item {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: 16px 20px;
    text-align: left;
    font-size: 15px;
    font-weight: 500;
    font-family: 'DM Sans', sans-serif;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.faq-question:hover { background: rgba(212, 175, 55, 0.04); }

.faq-question::after {
    content: '+';
    font-size: 20px;
    color: var(--gold-primary);
    font-weight: 300;
    transition: transform 0.2s;
    flex-shrink: 0;
    margin-left: 12px;
}

.faq-item.open .faq-question::after {
    content: '−';
}

.faq-answer {
    display: none;
    padding: 0 20px 16px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.faq-item.open .faq-answer { display: block; }

/* ===== RELATED TOOLS ===== */
.related-tools {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.related-tool-card {
    display: block;
    padding: 20px;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    text-decoration: none;
    transition: all 0.2s;
}

.related-tool-card:hover {
    border-color: var(--gold-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.related-tool-card h4 {
    font-size: 15px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.related-tool-card p {
    font-size: 13px;
    color: var(--text-tertiary);
}

/* ===== CTA BANNER ===== */
.cta-banner {
    max-width: 700px;
    margin: 0 auto 48px;
    padding: 0 24px;
}

.cta-inner {
    background: linear-gradient(135deg, var(--text-primary), #2D2D2D);
    border-radius: var(--radius);
    padding: 40px 32px;
    text-align: center;
    color: white;
}

.cta-inner h2 {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 8px;
}

.cta-inner p {
    color: rgba(255,255,255,0.7);
    margin-bottom: 24px;
    font-size: 15px;
}

.cta-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--gold-primary);
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
}

.cta-btn:hover {
    background: var(--gold-light);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.cta-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* ===== SITE FOOTER (4-column grid) ===== */
.site-footer {
    background: #1A1A1A;
    color: #B0B0B0;
    padding: 48px 24px 24px;
    margin-top: 48px;
}

.footer-grid {
    max-width: 960px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 32px;
}

.footer-col h4 {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: 0.02em;
}

.footer-col a {
    display: block;
    color: #B0B0B0;
    text-decoration: none;
    font-size: 14px;
    line-height: 2;
    transition: color 0.2s;
}

.footer-col a:hover { color: #D4AF37; }

.footer-desc {
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 16px;
    color: #888;
}

.footer-app-badges {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.footer-app-badges a {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(212,175,55,0.08);
    border: 1px solid rgba(212,175,55,0.2);
    border-radius: 6px;
    color: #D4AF37;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
}

.footer-app-badges a:hover {
    background: rgba(212,175,55,0.15);
    color: #D4AF37;
}

.footer-bottom {
    max-width: 960px;
    margin: 32px auto 0;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
    text-align: center;
    font-size: 13px;
}

.footer-bottom a { color: #D4AF37; text-decoration: none; }

@media (max-width: 768px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
}

@media (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr; gap: 20px; }
}

/* ===== TOOLS HUB SPECIFIC ===== */
.hub-hero {
    max-width: 900px;
    margin: 0 auto;
    padding: 48px 24px 32px;
    text-align: center;
}

.hub-hero h1 {
    font-family: 'Fraunces', Georgia, serif;
    font-size: clamp(32px, 6vw, 48px);
    font-weight: 500;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.hub-hero p {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto;
}

.hub-category {
    max-width: 900px;
    margin: 0 auto 40px;
    padding: 0 24px;
}

.hub-category h2 {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 22px;
    font-weight: 500;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border-light);
}

.tool-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.tool-card {
    display: flex;
    flex-direction: column;
    padding: 24px;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    text-decoration: none;
    transition: all 0.25s;
}

.tool-card:hover {
    border-color: var(--gold-primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.tool-card-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, rgba(212,175,55,0.12), rgba(212,175,55,0.04));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    font-size: 22px;
}

.tool-card h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.tool-card p {
    font-size: 14px;
    color: var(--text-tertiary);
    flex: 1;
}

.tool-card-arrow {
    margin-top: 14px;
    color: var(--gold-primary);
    font-size: 14px;
    font-weight: 600;
}

/* ===== SVG CHART ===== */
.chart-container {
    grid-column: 1 / -1;
    margin-top: 16px;
}

.chart-container svg {
    width: 100%;
    height: auto;
}

/* ===== UTILITY ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* ===== PRINT ===== */
@media print {
    .site-nav, .cta-banner, .site-footer { display: none; }
    .calc-card { box-shadow: none; border: 1px solid #ccc; }
}

/* Hero illustrations for tool pages */
.hero-illustration { text-align: center; margin-bottom: 4px; }
.hero-illustration svg { width: 220px; height: 80px; }
@media (max-width: 600px) { .hero-illustration svg { width: 180px; height: 65px; } }

/* Hero illustrations for tool pages */
.hero-illustration { text-align: center; margin-bottom: 4px; }
.hero-illustration svg { width: 220px; height: 80px; }
@media (max-width: 600px) { .hero-illustration svg { width: 180px; height: 65px; } }

/* ===== AI-SEO ELEMENTS ===== */
.quick-answer{max-width:700px;margin:0 auto 24px;padding:20px 24px;background:linear-gradient(135deg,rgba(212,175,55,0.06),rgba(212,175,55,0.02));border-left:4px solid #D4AF37;border-radius:0 12px 12px 0}
.quick-answer h2{color:#D4AF37;font-size:13px;font-weight:700;text-transform:uppercase;letter-spacing:1.5px;margin:0 0 8px}
.quick-answer p{font-size:15px;line-height:1.7;color:#333;margin:0}
.definition-box{max-width:700px;margin:0 auto 32px;padding:16px 24px;background:#FAFAF5;border:1px solid rgba(212,175,55,0.2);border-radius:12px;text-align:center}
.definition-box h2{color:#D4AF37;font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:1.5px;margin:0 0 8px}
.definition-box p{font-size:18px;font-family:'Courier New',Courier,monospace;color:#1A1A1A;margin:0;font-weight:500}
.reference-table{max-width:700px;margin:32px auto;padding:0 24px}
.reference-table h2{font-family:'Fraunces',Georgia,serif;font-size:22px;font-weight:500;margin-bottom:16px}
.reference-table table{width:100%;border-collapse:collapse;font-size:14px;background:#FFF;border-radius:12px;overflow:hidden;border:1px solid rgba(212,175,55,0.15)}
.reference-table th{background:rgba(212,175,55,0.08);padding:12px 14px;text-align:left;font-weight:600;font-size:13px;color:#333}
.reference-table td{padding:10px 14px;border-top:1px solid rgba(212,175,55,0.1);color:#444}
.reference-table tr:hover td{background:rgba(212,175,55,0.03)}
.stat-highlight{max-width:700px;margin:20px auto;padding:14px 24px;background:rgba(34,197,94,0.06);border-left:3px solid #22C55E;border-radius:0 8px 8px 0;font-size:14px;color:#333;font-style:italic;line-height:1.6}
.page-meta{max-width:700px;margin:40px auto 20px;padding:20px 24px;border-top:1px solid rgba(212,175,55,0.15)}
.page-meta .last-updated{color:#8A8A8A;font-size:13px;margin:0 0 8px}
.page-meta .about{color:#666;font-size:13px;line-height:1.6;margin:0}
.related-tools{max-width:700px;margin:24px auto;padding:0 24px}
.related-tools h2{font-family:'Fraunces',Georgia,serif;font-size:20px;font-weight:500;margin-bottom:12px}
.related-tools ul{list-style:none;padding:0;display:flex;flex-wrap:wrap;gap:8px}
.related-tools li a{display:inline-block;padding:8px 16px;background:rgba(212,175,55,0.06);border:1px solid rgba(212,175,55,0.15);border-radius:20px;color:#D4AF37;font-size:14px;text-decoration:none;transition:all 0.2s}
.related-tools li a:hover{background:rgba(212,175,55,0.12);border-color:#D4AF37}

/* ===== LOADING SPINNER ===== */
.loading-spinner{display:flex;align-items:center;justify-content:center;padding:48px 0;flex-direction:column;gap:12px}
.loading-spinner .spinner{width:36px;height:36px;border:3px solid var(--border-light);border-top-color:var(--gold-primary);border-radius:50%;animation:spin 0.8s linear infinite}
.loading-spinner p{font-size:14px;color:var(--text-tertiary)}
@keyframes spin{to{transform:rotate(360deg)}}
.error-msg{text-align:center;padding:24px;color:var(--red);font-size:15px}

/* ===== SECTOR ROTATION HEATMAP ===== */
.calc-card.wide{max-width:820px}
.heatmap-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
@media(max-width:768px){.heatmap-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:480px){.heatmap-grid{grid-template-columns:1fr}}
.hm-cell{padding:16px;border-radius:10px;border:1px solid var(--border-light);transition:transform 0.2s}
.hm-cell:hover{transform:translateY(-2px)}
.hm-hot{background:linear-gradient(135deg,rgba(34,197,94,0.08),rgba(34,197,94,0.03));border-color:rgba(34,197,94,0.2)}
.hm-warm{background:var(--bg-cream);border-color:var(--border-light)}
.hm-cold{background:linear-gradient(135deg,rgba(239,68,68,0.08),rgba(239,68,68,0.03));border-color:rgba(239,68,68,0.2)}
.hm-label{display:inline-block;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:0.08em;padding:3px 8px;border-radius:4px;margin-bottom:8px}
.hm-label-hot{background:var(--green);color:#fff}
.hm-label-neutral{background:var(--text-tertiary);color:#fff}
.hm-label-cold{background:var(--red);color:#fff}
.hm-name{font-size:15px;font-weight:600;color:var(--text-primary);margin-bottom:2px}
.hm-etf{font-size:12px;color:var(--text-tertiary);margin-bottom:10px}
.hm-bars{display:flex;flex-direction:column;gap:5px}
.hm-bar-row{display:flex;align-items:center;gap:8px}
.hm-bar-label{font-size:11px;color:var(--text-tertiary);width:24px;text-align:right;flex-shrink:0}
.hm-bar-track{flex:1;height:8px;background:#F0F0F0;border-radius:4px;overflow:hidden;position:relative}
.hm-bar-fill{height:100%;border-radius:4px;transition:width 0.5s ease;min-width:2px}
.hm-bar-fill.positive{background:var(--green)}
.hm-bar-fill.negative{background:var(--red)}
.hm-bar-value{font-size:11px;font-weight:600;width:48px;text-align:right;flex-shrink:0}
.hm-momentum{margin-top:8px;padding-top:8px;border-top:1px solid var(--border-light);font-size:12px;color:var(--text-secondary)}
.hm-momentum strong{color:var(--text-primary)}

/* ===== EARNINGS BRIEFING ===== */
.eb-countdown{display:flex;align-items:center;justify-content:center;gap:12px;padding:20px;border-radius:10px;margin-bottom:16px;text-align:center}
.eb-imminent{background:linear-gradient(135deg,rgba(239,68,68,0.1),rgba(239,68,68,0.04));border:1px solid rgba(239,68,68,0.2)}
.eb-soon{background:linear-gradient(135deg,rgba(234,179,8,0.1),rgba(234,179,8,0.04));border:1px solid rgba(234,179,8,0.2)}
.eb-upcoming{background:linear-gradient(135deg,rgba(34,197,94,0.1),rgba(34,197,94,0.04));border:1px solid rgba(34,197,94,0.2)}
.eb-days{font-family:'Fraunces',Georgia,serif;font-size:36px;font-weight:500}
.eb-imminent .eb-days{color:var(--red)}
.eb-soon .eb-days{color:#EAB308}
.eb-upcoming .eb-days{color:var(--green)}
.eb-days-label{font-size:13px;color:var(--text-secondary)}
.eb-date{font-size:14px;color:var(--text-secondary)}
.eb-bar-chart{display:flex;align-items:flex-end;gap:8px;height:120px;padding:16px 0;margin-bottom:16px}
.eb-bar{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;height:100%}
.eb-bar-fill{width:100%;border-radius:4px 4px 0 0;transition:height 0.5s ease;min-height:4px}
.eb-bar-fill.revenue{background:var(--gold-primary)}
.eb-bar-fill.income{background:var(--blue)}
.eb-bar-date{font-size:10px;color:var(--text-tertiary);margin-top:4px;white-space:nowrap}
.eb-bar-legend{display:flex;gap:16px;justify-content:center;margin-bottom:16px;font-size:12px;color:var(--text-secondary)}
.eb-bar-legend span::before{content:'';display:inline-block;width:10px;height:10px;border-radius:2px;margin-right:4px;vertical-align:middle}
.eb-bar-legend .legend-rev::before{background:var(--gold-primary)}
.eb-bar-legend .legend-inc::before{background:var(--blue)}
.eb-analyst-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin-top:16px}
@media(max-width:480px){.eb-analyst-grid{grid-template-columns:1fr}}
.eb-analyst-item{padding:12px;background:var(--bg-cream);border-radius:8px;text-align:center}
.eb-analyst-item .label{font-size:11px;font-weight:600;color:var(--text-tertiary);text-transform:uppercase;letter-spacing:0.05em;margin-bottom:4px}
.eb-analyst-item .value{font-family:'Fraunces',Georgia,serif;font-size:18px;font-weight:500;color:var(--text-primary)}
.eb-section-title{font-size:14px;font-weight:600;color:var(--text-primary);margin:20px 0 10px;text-transform:uppercase;letter-spacing:0.04em}
.eb-pro-teaser{padding:16px;background:linear-gradient(135deg,rgba(212,175,55,0.08),rgba(212,175,55,0.03));border:1px dashed var(--gold-primary);border-radius:10px;text-align:center;margin-top:16px;font-size:14px;color:var(--text-secondary)}
.eb-pro-teaser a{color:var(--gold-primary);font-weight:600;text-decoration:none}

/* ===== INSIDER TRACKER ===== */
.it-signal-badge{display:inline-flex;align-items:center;gap:8px;padding:10px 20px;border-radius:10px;font-size:16px;font-weight:700;letter-spacing:0.03em;margin-bottom:16px}
.it-bullish{background:var(--green-bg);color:var(--green);border:1px solid rgba(34,197,94,0.2)}
.it-bearish{background:var(--red-bg);color:var(--red);border:1px solid rgba(239,68,68,0.2)}
.it-neutral{background:var(--bg-cream);color:var(--text-secondary);border:1px solid var(--border-light)}
.it-counts{display:flex;gap:12px;margin-bottom:16px}
.it-count-box{flex:1;padding:12px;border-radius:8px;text-align:center}
.it-count-box.buys{background:var(--green-bg);border:1px solid rgba(34,197,94,0.15)}
.it-count-box.sells{background:var(--red-bg);border:1px solid rgba(239,68,68,0.15)}
.it-count-box .num{font-family:'Fraunces',Georgia,serif;font-size:28px;font-weight:500}
.it-count-box.buys .num{color:var(--green)}
.it-count-box.sells .num{color:var(--red)}
.it-count-box .txt{font-size:12px;color:var(--text-tertiary);text-transform:uppercase;letter-spacing:0.05em}
.it-ownership{display:flex;gap:12px;margin-bottom:16px}
.it-ownership-bar{flex:1}
.it-ownership-label{font-size:11px;font-weight:600;color:var(--text-tertiary);text-transform:uppercase;letter-spacing:0.04em;margin-bottom:4px}
.it-ownership-track{height:10px;background:#F0F0F0;border-radius:5px;overflow:hidden}
.it-ownership-fill{height:100%;border-radius:5px;background:var(--gold-primary);transition:width 0.5s ease}
.it-ownership-value{font-size:13px;font-weight:600;color:var(--text-primary);margin-top:3px}
.it-tx-table{width:100%;border-collapse:collapse;font-size:13px;margin-top:12px}
.it-tx-table th{text-align:left;padding:8px 10px;background:var(--bg-cream);font-size:11px;font-weight:600;color:var(--text-tertiary);text-transform:uppercase;letter-spacing:0.05em;border-bottom:1px solid var(--border-light)}
.it-tx-table td{padding:8px 10px;border-bottom:1px solid var(--border-light);color:var(--text-secondary)}
.it-tx-table .tx-buy{color:var(--green);font-weight:600}
.it-tx-table .tx-sell{color:var(--red);font-weight:600}
.it-pro-teaser{padding:16px;background:linear-gradient(135deg,rgba(212,175,55,0.08),rgba(212,175,55,0.03));border:1px dashed var(--gold-primary);border-radius:10px;text-align:center;margin-top:12px;font-size:14px;color:var(--text-secondary)}
.it-pro-teaser a{color:var(--gold-primary);font-weight:600;text-decoration:none}

/* ===== INLINE NAV SEARCH (Investing.com style) ===== */
.nav-search-wrap {
    position: relative;
    flex: 1;
    max-width: 480px;
}

.nav-search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-white);
    border: 1px solid #D8D8D8;
    border-radius: 8px;
    padding: 7px 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.nav-search-box:focus-within {
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12);
}

.nav-search-icon {
    width: 17px;
    height: 17px;
    color: var(--text-tertiary);
    flex-shrink: 0;
}

.nav-search-box:focus-within .nav-search-icon {
    color: var(--gold-primary);
}

.nav-search-input {
    border: none;
    outline: none;
    background: none;
    font-size: 14px;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-primary);
    width: 100%;
    line-height: 1.4;
}

.nav-search-input::placeholder {
    color: var(--text-tertiary);
    font-size: 13px;
}

/* Dropdown results */
.nav-search-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 420px;
    overflow-y: auto;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(212, 175, 55, 0.08);
    padding: 6px;
    z-index: 200;
}

.nav-search-dropdown.open {
    display: block;
}

/* Group headers */
.nsr-group {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 10px 10px 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nsr-group-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Result items */
.nsr-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px 7px 22px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-primary);
    transition: background 0.1s;
    cursor: pointer;
}

.nsr-item:hover,
.nsr-item.nsr-selected {
    background: rgba(212, 175, 55, 0.08);
}

.nsr-title {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nsr-title mark {
    background: rgba(212, 175, 55, 0.25);
    color: inherit;
    border-radius: 2px;
    padding: 0 1px;
}

.nsr-empty {
    text-align: center;
    padding: 20px 12px;
    font-size: 13px;
    color: var(--text-tertiary);
}

/* Mobile: search box stays in top row */
@media (max-width: 768px) {
    .nav-search-wrap { flex: 1; max-width: none; }
    .nav-search-dropdown { left: -60px; right: -16px; width: auto; }
}
