/* ============================================================================
   Insight Edge — Design System v2
   Modern dark fintech aesthetic with Inter + JetBrains Mono
   ============================================================================ */

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

/* ── Design Tokens ────────────────────────────────────────────────────────── */
:root {
    /* Backgrounds */
    --bg-base:    #050a14;
    --bg-surface: #0d1525;
    --bg-card:    #111c2e;
    --bg-raised:  #162035;
    --bg-hover:   #1a2640;

    /* Backward-compat aliases */
    --dark-bg:    #111c2e;
    --card-bg:    #111c2e;

    /* Borders */
    --border-subtle:  rgba(255,255,255,0.05);
    --border-default: rgba(255,255,255,0.09);
    --border-bright:  rgba(255,255,255,0.15);
    --border-color:   rgba(255,255,255,0.09);

    /* Text */
    --text-primary:   #f0f4ff;
    --text-secondary: #8b9ab5;
    --text-muted:     #4a5568;

    /* Brand colours */
    --primary-color:  #3b82f6;
    --secondary-color:#10b981;
    --success-color:  #10b981;
    --danger-color:   #ef4444;
    --warning-color:  #f59e0b;
    --blue:           #3b82f6;
    --green:          #10b981;
    --red:            #ef4444;
    --amber:          #f59e0b;
    --purple:         #8b5cf6;

    /* Gradients */
    --grad-blue:   linear-gradient(135deg, #3b82f6, #2563eb);
    --grad-green:  linear-gradient(135deg, #10b981, #059669);
    --grad-brand:  linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);

    /* Shadows */
    --shadow:    0 4px 16px rgba(0,0,0,0.5);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.6);

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-base);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Scrollbar ────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2a3a55; border-radius: 99px; }

/* ── Navbar ───────────────────────────────────────────────────────────────── */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(5, 10, 20, 0.88);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0;
    box-shadow: 0 1px 0 rgba(255,255,255,0.04);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 58px;
    gap: 20px;
}

/* Brand */
.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.nav-brand h1 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    line-height: 1;
    margin: 0;
}

/* Logo mark replacing the icon */
.nav-brand h1 .fa-chart-line {
    width: 32px;
    height: 32px;
    background: var(--grad-brand);
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    color: white;
    box-shadow: 0 0 16px rgba(59,130,246,0.3);
    flex-shrink: 0;
}

.nav-brand .tagline {
    font-size: 0.63rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    display: block;
    margin-top: 1px;
}

/* Nav menu */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
    flex-wrap: nowrap;
}

.nav-menu a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    border-radius: var(--radius-sm);
    font-size: 0.81rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.15s;
    white-space: nowrap;
}

.nav-menu a i { font-size: 0.75rem; }

.nav-menu a:hover { color: var(--text-primary); background: var(--bg-raised); }
.nav-menu a.active { color: var(--blue); background: rgba(59,130,246,0.1); }

/* Auth section in nav */
#nav-auth {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
}

.nav-logout {
    padding: 5px 12px !important;
    font-size: 0.78rem !important;
    color: var(--text-muted) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-sm) !important;
    transition: all 0.15s !important;
}

.nav-logout:hover {
    color: var(--red) !important;
    border-color: rgba(239,68,68,0.3) !important;
    background: rgba(239,68,68,0.07) !important;
}

.nav-login, .nav-signup {
    padding: 6px 14px !important;
    border-radius: var(--radius-sm) !important;
    font-size: 0.81rem !important;
    font-weight: 600 !important;
}

.nav-login { color: var(--text-secondary) !important; }
.nav-signup {
    background: var(--grad-blue) !important;
    color: white !important;
    box-shadow: 0 2px 10px rgba(59,130,246,0.3) !important;
}

/* ── Main content ─────────────────────────────────────────────────────────── */
.main-content {
    padding: 28px 0 60px;
    min-height: calc(100vh - 180px);
}

/* ── Tooltip system ───────────────────────────────────────────────────────── */
.tipwrap { position: relative; }

.tipbox {
    display: none;
    position: absolute;
    z-index: 500;
    background: #0d1525;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    font-size: 0.77rem;
    color: var(--text-secondary);
    line-height: 1.6;
    width: 300px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.55);
    pointer-events: none;
    text-align: left;
    font-weight: 400;
}

.tipbox.tip-up   { bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%); }
.tipbox.tip-down { top: calc(100% + 10px);    left: 50%; transform: translateX(-50%); }
.tipbox.tip-left { right: calc(100% + 10px);  top: 0; }

.tipbox.tip-up::after {
    content: '';
    position: absolute;
    top: 100%; left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--border-default);
}

.tipbox.tip-down::after {
    content: '';
    position: absolute;
    bottom: 100%; left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-bottom-color: var(--border-default);
}

.tipwrap:hover .tipbox { display: block; }

.regime-help-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: help;
}

.regime-desc-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #0d1525;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    font-size: 0.77rem;
    color: var(--text-secondary);
    line-height: 1.6;
    width: 360px;
    z-index: 500;
    pointer-events: none;
    box-shadow: 0 8px 28px rgba(0,0,0,0.55);
}

.regime-help-wrap:hover .regime-desc-tooltip { display: block; }

.tab-btn.tipwrap { display: inline-flex; align-items: center; justify-content: center; }
.tab-btn .tipbox { min-width: 280px; }
.tabs { overflow-x: auto !important; -webkit-overflow-scrolling: touch; padding-bottom: 2px; scrollbar-width: thin; scrollbar-color: #2a3a55 transparent; }
.tab-btn { flex-shrink: 0; white-space: nowrap; }

/* ── Market Regime Banner ─────────────────────────────────────────────────── */
.regime-banner {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    padding: 16px 22px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 18px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.regime-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 180px;
}

.regime-info { display: flex; flex-direction: column; gap: 5px; }

.regime-label {
    font-weight: 600;
    font-size: 0.67rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-muted);
}

.regime-type {
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 99px;
    background: rgba(59,130,246,0.15);
    border: 1px solid rgba(59,130,246,0.3);
    color: #fff;
    white-space: nowrap;
    display: inline-block;
}

.regime-confidence { font-size: 0.75rem; color: var(--text-secondary); }

.regime-indicators { display: flex; gap: 6px; flex-wrap: wrap; }

.indicator-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    background: var(--bg-raised);
    border: 1px solid var(--border-default);
    border-radius: 99px;
    font-size: 0.73rem;
    color: var(--text-secondary);
    cursor: help;
    white-space: nowrap;
}

.indicator-chip strong { color: var(--text-primary); }

.regime-weights {
    display: flex;
    flex-direction: column;
    gap: 7px;
    flex: 1;
    max-width: 380px;
}

.weight-row {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: help;
}

.weight-label {
    font-size: 0.74rem;
    color: var(--text-secondary);
    width: 88px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

.weight-icon { font-size: 0.68rem; color: var(--text-muted); }

.weight-bar-track {
    flex: 1;
    height: 5px;
    background: var(--bg-hover);
    border-radius: 99px;
    overflow: hidden;
}

.weight-bar-fill {
    height: 100%;
    border-radius: 99px;
    width: 0%;
    transition: width 0.7s ease;
}

.weight-pct {
    font-size: 0.73rem;
    font-weight: 700;
    width: 30px;
    text-align: right;
    color: var(--text-secondary);
    flex-shrink: 0;
    font-family: 'JetBrains Mono', monospace;
}

/* ── Search section ───────────────────────────────────────────────────────── */
.search-section {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    padding: 22px 26px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 18px;
}

.search-box {
    display: flex;
    gap: 10px;
    max-width: 560px;
}

.search-box input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: var(--bg-surface);
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.search-box input::placeholder {
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.85rem;
}

.search-box input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 22px;
    background: var(--grad-blue);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    box-shadow: 0 4px 14px rgba(59,130,246,0.3);
    letter-spacing: 0.01em;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(59,130,246,0.45);
}

.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

/* ── Analysis container ───────────────────────────────────────────────────── */
.analysis-container {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    padding: 24px 28px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    animation: fadeIn 0.4s ease;
}

/* ── Stock header ─────────────────────────────────────────────────────────── */
.stock-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 22px;
    gap: 20px;
    flex-wrap: wrap;
}

.stock-title h2 {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 3px;
}

.stock-title p { color: var(--text-secondary); font-size: 0.83rem; }

.stock-price h2 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.stock-price p { text-align: right; font-size: 1rem; font-weight: 600; }

/* ── Signal card ──────────────────────────────────────────────────────────── */
.signal-card {
    background: linear-gradient(135deg, rgba(59,130,246,0.12) 0%, rgba(139,92,246,0.10) 100%);
    border: 1px solid rgba(59,130,246,0.2);
    color: var(--text-primary);
    padding: 22px 24px;
    border-radius: var(--radius-lg);
    margin-bottom: 22px;
}

.signal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 10px;
}

.signal-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 18px;
    border-radius: 99px;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
}

.signal-badge.buy, .signal-badge.BUY, .signal-badge.strong_buy {
    background: rgba(16,185,129,0.15);
    border: 1px solid rgba(16,185,129,0.35);
    color: var(--green);
    box-shadow: 0 0 20px rgba(16,185,129,0.1);
}

.signal-badge.sell, .signal-badge.SELL, .signal-badge.strong_sell {
    background: rgba(239,68,68,0.15);
    border: 1px solid rgba(239,68,68,0.35);
    color: var(--red);
}

.signal-badge.hold, .signal-badge.HOLD {
    background: rgba(245,158,11,0.12);
    border: 1px solid rgba(245,158,11,0.3);
    color: var(--amber);
}

/* signal-badge inside compare/small contexts */
.signal-badge.strong_buy, .signal-badge.strong_sell { }
.signal-badge.signal-BUY  { background:rgba(16,185,129,0.15); border:1px solid rgba(16,185,129,0.3); color:var(--green); }
.signal-badge.signal-SELL { background:rgba(239,68,68,0.15);  border:1px solid rgba(239,68,68,0.3);  color:var(--red); }
.signal-badge.signal-HOLD { background:rgba(245,158,11,0.12); border:1px solid rgba(245,158,11,0.25);color:var(--amber); }
.signal-badge.signal-STRONG_BUY  { background:rgba(16,185,129,0.2); border:1px solid rgba(16,185,129,0.4); color:#34d399; }
.signal-badge.signal-STRONG_SELL { background:rgba(239,68,68,0.2);  border:1px solid rgba(239,68,68,0.4);  color:#f87171; }

.confidence-meter { margin-bottom: 18px; }

.confidence-meter label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.progress-bar {
    background: var(--bg-raised);
    height: 10px;
    border-radius: 99px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: var(--grad-blue);
    transition: width 0.6s ease;
    border-radius: 99px;
}

.confidence-meter span {
    display: inline-block;
    margin-top: 5px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
}

.signal-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.detail-item {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-subtle);
    padding: 12px 14px;
    border-radius: var(--radius-md);
}

.detail-item label {
    display: block;
    font-size: 0.67rem;
    margin-bottom: 4px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-weight: 600;
}

.detail-item span {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* ── Chart container ──────────────────────────────────────────────────────── */
.chart-container { margin-bottom: 22px; }
.chart-container h3 { margin-bottom: 10px; color: var(--text-secondary); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; }

.tradingview-widget-container {
    height: 500px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-surface);
}

#tradingview_widget { height: 100%; }

/* ── Tabs ─────────────────────────────────────────────────────────────────── */
.tabs-container { margin-top: 22px; }

.tabs {
    display: flex;
    gap: 2px;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 18px;
}

.tab-btn {
    padding: 9px 15px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    cursor: pointer;
    font-size: 0.81rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tab-btn i { font-size: 0.75rem; }
.tab-btn:hover { color: var(--text-secondary); }
.tab-btn.active { color: var(--blue); border-bottom-color: var(--blue); }

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── Metrics grid ─────────────────────────────────────────────────────────── */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.metric-card {
    background: var(--bg-surface);
    padding: 16px 18px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    transition: border-color 0.15s, transform 0.15s;
}

.metric-card:hover { border-color: var(--border-default); transform: translateY(-2px); }

.metric-card label {
    display: block;
    font-size: 0.67rem;
    color: var(--text-muted);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-weight: 600;
}

.metric-card .subtext {
    display: block;
    margin-top: 3px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.metric-card span {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
}

.signal-indicator {
    display: inline-block;
    width: 7px; height: 7px;
    border-radius: 50%;
    margin-left: 6px;
    vertical-align: middle;
}

.signal-indicator.bullish { background: var(--green); box-shadow: 0 0 6px var(--green); }
.signal-indicator.bearish { background: var(--red); }
.signal-indicator.neutral { background: var(--amber); }

/* ── ML Prediction ────────────────────────────────────────────────────────── */
.ml-prediction { max-width: 720px; margin: 0 auto; }

.prediction-main { text-align: center; margin-bottom: 22px; }
.prediction-label { font-size: 1rem; color: var(--text-secondary); margin-right: 10px; }
.prediction-value { font-family: 'JetBrains Mono', monospace; font-size: 1.8rem; font-weight: 800; }

.probability-bars { display: flex; flex-direction: column; gap: 14px; }
.prob-item label { display: block; margin-bottom: 5px; font-weight: 600; font-size: 0.82rem; color: var(--text-secondary); }
.prob-item .progress-bar { background: var(--bg-raised); }
.prob-item span { display: inline-block; margin-top: 3px; font-weight: 600; font-family: 'JetBrains Mono', monospace; }

.bg-success { background: var(--green) !important; }
.bg-warning { background: var(--amber) !important; }
.bg-danger  { background: var(--red)   !important; }

/* ── Sentiment summary ────────────────────────────────────────────────────── */
.sentiment-summary { max-width: 560px; margin: 0 auto; }
.sentiment-main { text-align: center; margin-bottom: 20px; }
.sentiment-value { font-family: 'JetBrains Mono', monospace; font-size: 1.8rem; font-weight: 800; }

.sentiment-details { display: flex; flex-direction: column; gap: 10px; }

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
}

.detail-row label { font-weight: 600; color: var(--text-secondary); font-size: 0.82rem; }

/* ── Utility ──────────────────────────────────────────────────────────────── */
.text-success { color: var(--green); }
.text-danger  { color: var(--red);   }
.text-warning { color: var(--amber); }
.text-center  { text-align: center; }
.mt-1 { margin-top: 6px; }   .mt-2 { margin-top: 12px; }  .mt-4 { margin-top: 24px; }
.mb-1 { margin-bottom: 6px; }.mb-2 { margin-bottom: 12px; }.mb-4 { margin-bottom: 24px; }

/* ── Loading indicator ────────────────────────────────────────────────────── */
.loading {
    text-align: center;
    padding: 48px 24px;
}

.spinner {
    width: 44px;
    height: 44px;
    border: 3px solid var(--border-default);
    border-top-color: var(--blue);
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
    margin: 0 auto 14px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading p {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* ── Error alert ──────────────────────────────────────────────────────────── */
.error-alert {
    background: rgba(239,68,68,0.08);
    color: #f87171;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(239,68,68,0.25);
    margin: 16px 0;
    font-size: 0.84rem;
}

.error-alert i { margin-right: 8px; }

/* ── Footer ───────────────────────────────────────────────────────────────── */
footer {
    border-top: 1px solid var(--border-subtle);
    padding: 22px 0;
    margin-top: 48px;
    background: transparent;
    color: var(--text-primary);
}

footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

footer .disclaimer {
    background: transparent;
    padding: 0;
    border: none;
    margin: 0;
    font-size: 0.73rem;
    color: var(--text-muted);
    max-width: 640px;
    line-height: 1.6;
}

footer .copyright {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.72rem;
}

/* ── Animations ───────────────────────────────────────────────────────────── */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.analysis-container { animation: fadeIn 0.4s ease; }

/* ── Style buttons (trading style) ───────────────────────────────────────── */
.style-btn {
    padding: 6px 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
    font-family: 'Inter', sans-serif;
}

.style-btn.active {
    background: rgba(59,130,246,0.12);
    border-color: rgba(59,130,246,0.35);
    color: var(--blue);
}

.style-btn:hover:not(.active) {
    border-color: var(--border-bright);
    color: var(--text-primary);
}

/* ── Edge cards ───────────────────────────────────────────────────────────── */
.edge-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    transition: border-color 0.15s;
}

.edge-card:hover { border-color: var(--border-default); }

.edge-score-bar {
    height: 5px;
    border-radius: 99px;
    background: var(--bg-raised);
    overflow: hidden;
    margin-top: 6px;
}

.edge-score-fill {
    height: 100%;
    border-radius: 99px;
    transition: width 0.7s ease;
}

/* ── Onboarding card ──────────────────────────────────────────────────────── */
.onboard-card {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    max-width: 540px;
    margin: 0 auto;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .navbar .container { flex-wrap: wrap; height: auto; padding: 10px 20px; }
    .nav-menu { gap: 1px; }
    .regime-banner { flex-direction: column; gap: 12px; }
    .regime-weights { max-width: 100%; }
}

@media (max-width: 640px) {
    .container { padding: 0 16px; }
    .search-box { flex-direction: column; }
    .stock-header { flex-direction: column; gap: 12px; text-align: center; }
    .metrics-grid { grid-template-columns: 1fr 1fr; }
    .signal-details { grid-template-columns: 1fr 1fr; }
    .nav-brand .tagline { display: none; }
}
