/* ==========================================
   FORECAST DASHBOARD STYLES
   Clinical prediction market aesthetic
   One canonical chart. Dense. Precise.
   ========================================== */

:root {
    --fc-bg: #0a0a0a;
    --fc-surface: #0f0f11;
    --fc-surface-2: #141418;
    --fc-surface-3: #1a1a1f;
    --fc-border: rgba(255, 255, 255, 0.06);
    --fc-border-bright: rgba(255, 255, 255, 0.1);
    --fc-green: #00e676;
    --fc-red: #ff3d71;
    --fc-gold: #ffca28;
    --fc-orange: #ff9100;
    --fc-text: #e8e8eb;
    --fc-text-dim: #8b8b96;
    --fc-text-muted: #4e4e5a;
    --fc-accent: #00e676;
}

/* ---- Hero Dashboard ---- */

.hero-dashboard {
    text-align: center;
    padding-top: 4rem;
    padding-bottom: 0.5rem;
}

.hero-dashboard .hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    border-radius: 100px;
    background: var(--fc-surface-2);
    border: 1px solid var(--fc-border-bright);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--fc-accent);
    text-transform: lowercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.75rem;
}

.hero-badge .dot.live {
    width: 6px;
    height: 6px;
    background: var(--fc-accent);
    border-radius: 50%;
    animation: pulse 2.5s ease-in-out infinite;
}

.hero-badge-date {
    color: var(--fc-text-muted);
    font-weight: 400;
}

.hero-dashboard .hero-h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 0.35rem;
    color: var(--fc-text);
    letter-spacing: -0.03em;
}

.hero-accent {
    color: var(--fc-accent);
}

.hero-dashboard .hero-p {
    font-size: 0.82rem;
    color: var(--fc-text-dim);
    max-width: 460px;
    margin: 0 auto 0.75rem;
    line-height: 1.4;
}

/* Market Summary Stats — compact pill row */
.market-summary {
    display: inline-flex;
    gap: 0;
    border: 1px solid var(--fc-border-bright);
    border-radius: 0.5rem;
    background: var(--fc-surface);
    overflow: hidden;
}

.market-stat {
    padding: 0.5rem 1rem;
    text-align: center;
    position: relative;
}

.market-stat:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 24px;
    background: var(--fc-border-bright);
}

.market-stat-label {
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--fc-text-muted);
    margin-bottom: 0.2rem;
    letter-spacing: 0.08em;
}

.market-stat-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--fc-text);
    font-variant-numeric: tabular-nums;
}

.market-stat-value.green { color: var(--fc-green); }
.market-stat-value.red { color: var(--fc-red); }

/* ---- Forecast Ticker ---- */

.forecast-ticker {
    background: var(--fc-surface);
    border-top: 1px solid var(--fc-border);
    border-bottom: 1px solid var(--fc-border);
    padding: 0.45rem 0;
    overflow: hidden;
    position: relative;
}

.forecast-ticker::before,
.forecast-ticker::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 60px;
    z-index: 2;
    pointer-events: none;
}

.forecast-ticker::before {
    left: 0;
    background: linear-gradient(to right, var(--fc-surface), transparent);
}

.forecast-ticker::after {
    right: 0;
    background: linear-gradient(to left, var(--fc-surface), transparent);
}

.ticker-track {
    display: flex;
    gap: 0;
    animation: ticker-scroll 60s linear infinite;
    width: max-content;
}

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

.ticker-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 1rem;
    white-space: nowrap;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--fc-text-dim);
    cursor: pointer;
    transition: color 0.15s;
    border-radius: 3px;
    text-decoration: none;
    font-variant-numeric: tabular-nums;
}

.ticker-item:hover {
    color: var(--fc-text);
}

.ticker-emoji {
    font-size: 0.85rem;
}

.ticker-name {
    font-weight: 600;
    color: var(--fc-text-dim);
}

.ticker-item:hover .ticker-name {
    color: var(--fc-text);
}

.ticker-score {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 800;
    min-width: 2ch;
    font-variant-numeric: tabular-nums;
}

.ticker-delta {
    font-weight: 600;
    font-size: 0.7rem;
    font-variant-numeric: tabular-nums;
}

.ticker-delta.green { color: var(--fc-green); }
.ticker-delta.red { color: var(--fc-red); }
.ticker-delta.neutral { color: var(--fc-text-muted); }

.ticker-sep {
    color: var(--fc-text-muted);
    margin: 0 0.15rem;
    opacity: 0.4;
}

/* ---- Section Layout ---- */

.forecast-section {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.forecast-section-header {
    margin-bottom: 1rem;
}

.section-h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-weight: 900;
    color: var(--fc-text);
    margin-bottom: 0.5rem;
}

.section-sub {
    font-size: 0.85rem;
    color: var(--fc-text-muted);
}

/* ===================================================
   THE CHART — One canonical ranking of all professions
   =================================================== */

.the-chart {
    max-width: 1000px;
    margin: 0 auto;
    padding: 1rem 1.5rem 3rem;
}

/* ---- Chart Search ---- */

.chart-search-wrap {
    position: relative;
    margin-bottom: 0.75rem;
    max-width: 380px;
}

.chart-search {
    width: 100%;
    padding: 0.5rem 2.2rem 0.5rem 2rem;
    border-radius: 6px;
    border: 1px solid var(--fc-border);
    background: rgba(255,255,255,0.03);
    color: var(--fc-text);
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    outline: none;
    transition: border-color 0.15s, background 0.15s;
}

.chart-search::placeholder {
    color: #555;
    font-weight: 400;
}

.chart-search:focus {
    border-color: rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.05);
}

.chart-search-icon {
    position: absolute;
    left: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    color: #555;
    font-size: 0.85rem;
    pointer-events: none;
}

.chart-search-clear {
    position: absolute;
    right: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 0.75rem;
    cursor: pointer;
    padding: 0.2rem;
    line-height: 1;
}

.chart-search-clear:hover {
    color: #fff;
}

/* ---- Category Filter Tabs ---- */

.chart-filters {
    display: flex;
    gap: 0.35rem;
    padding: 0 0.25rem;
    margin-bottom: 0.75rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.chart-filters::-webkit-scrollbar {
    display: none;
}

.filter-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.65rem;
    border-radius: 4px;
    border: 1px solid var(--fc-border);
    background: transparent;
    color: #8a8a96;
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: lowercase;
    letter-spacing: 0.04em;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
    font-family: 'Inter', sans-serif;
}

.filter-tab:hover {
    color: var(--fc-text-dim);
    border-color: var(--fc-border-bright);
    background: var(--fc-surface);
}

.filter-tab.active {
    color: var(--fc-accent);
    border-color: rgba(0, 230, 118, 0.25);
    background: rgba(0, 230, 118, 0.06);
}

.filter-count {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.55rem;
    font-weight: 700;
    color: var(--fc-text-muted);
    font-variant-numeric: tabular-nums;
}

.filter-tab.active .filter-count {
    color: var(--fc-accent);
    opacity: 0.7;
}

/* Watchlist filter tab — gold accent */
.filter-tab-watchlist {
    color: var(--fc-gold);
    border-color: rgba(255, 202, 40, 0.15);
}

.filter-tab-watchlist:hover {
    border-color: rgba(255, 202, 40, 0.3);
    background: rgba(255, 202, 40, 0.04);
}

.filter-tab-watchlist.active {
    color: var(--fc-gold);
    border-color: rgba(255, 202, 40, 0.3);
    background: rgba(255, 202, 40, 0.08);
}

.filter-tab-watchlist .filter-count {
    color: var(--fc-gold);
    opacity: 0.6;
}

.chart-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding: 0 0.25rem;
}

.chart-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--fc-text-muted);
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

#chartCount {
    font-size: 0.6rem;
    font-weight: 500;
    color: var(--fc-text-muted);
    opacity: 0.6;
    font-variant-numeric: tabular-nums;
}

.chart-updated {
    font-size: 0.65rem;
    color: var(--fc-text-muted);
    font-variant-numeric: tabular-nums;
}

/* Chart container */
.chart-container-main {
    background: var(--fc-surface);
    border: 1px solid var(--fc-border);
    border-radius: 0.75rem;
    overflow: hidden;
}

/* Column headers */
.chart-col-headers {
    display: grid;
    grid-template-columns: 2.5rem 1fr 3.5rem 3.5rem 80px 5rem 1fr 2rem;
    gap: 0;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid var(--fc-border-bright);
    background: var(--fc-surface-2);
    align-items: center;
}

.chart-col-header {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--fc-text-muted);
    cursor: pointer;
    transition: color 0.15s;
    user-select: none;
    white-space: nowrap;
}

.chart-col-header:hover {
    color: var(--fc-text-dim);
}

.chart-col-header.active {
    color: var(--fc-accent);
}

.chart-col-header.align-right {
    text-align: right;
}

.chart-col-header.align-center {
    text-align: center;
}

/* Individual trade rows */
.chart-row {
    display: grid;
    grid-template-columns: 2.5rem 1fr 3.5rem 3.5rem 80px 5rem 1fr 2rem;
    gap: 0;
    padding: 0 1rem;
    align-items: center;
    min-height: 46px;
    border-bottom: 1px solid var(--fc-border);
    transition: background 0.12s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.chart-row:last-child {
    border-bottom: none;
}

.chart-row:hover {
    background: var(--fc-surface-2);
}

/* Rank column */
.chart-rank {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--fc-text-muted);
    text-align: center;
    font-variant-numeric: tabular-nums;
}

/* Trade name + emoji column */
.chart-trade {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.5rem 0;
    min-width: 0;
}

.chart-trade-emoji {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.chart-trade-info {
    min-width: 0;
}

.chart-trade-name {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--fc-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chart-trade-cat {
    font-size: 0.6rem;
    color: var(--fc-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 500;
}

/* Score column */
.chart-score {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.25rem;
    font-weight: 900;
    text-align: right;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

/* Change column */
.chart-change {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.chart-change.positive { color: var(--fc-green); }
.chart-change.negative { color: var(--fc-red); }
.chart-change.flat { color: var(--fc-text-muted); }

/* Sparkline cell — replaces old score bars */
.chart-sparkline-cell {
    padding: 0 0.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-sparkline {
    display: block;
    width: 80px;
    height: 24px;
}

/* Watch button */
.chart-watch-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: none;
    background: none;
    color: var(--fc-text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.15s;
    padding: 0;
    line-height: 1;
}

.chart-watch-btn:hover {
    color: var(--fc-gold);
    background: rgba(255, 202, 40, 0.06);
}

.chart-watch-btn.watched {
    color: var(--fc-gold);
}

.chart-watch-btn.watched:hover {
    color: var(--fc-text-muted);
    background: rgba(255, 255, 255, 0.03);
}

/* Drama mode: red accent on danger rows */
.chart-row-danger {
    border-left: 2px solid rgba(255, 61, 113, 0.3);
}

/* Outlook column */
.chart-outlook {
    text-align: center;
}

.chart-outlook-badge {
    font-size: 0.62rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: 3px;
    text-transform: lowercase;
    white-space: nowrap;
    display: inline-block;
    letter-spacing: 0.02em;
}

.chart-outlook-badge.locked-in {
    background: rgba(0, 230, 118, 0.1);
    color: var(--fc-green);
}

.chart-outlook-badge.solid {
    background: rgba(0, 230, 118, 0.08);
    color: var(--fc-green);
}

.chart-outlook-badge.mid {
    background: rgba(255, 202, 40, 0.08);
    color: var(--fc-gold);
}

.chart-outlook-badge.shaky {
    background: rgba(255, 145, 0, 0.08);
    color: var(--fc-orange);
}

.chart-outlook-badge.cooked {
    background: rgba(255, 61, 113, 0.08);
    color: var(--fc-red);
}

/* Signal preview column */
.chart-signal {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
    padding-left: 0.75rem;
}

.chart-signal-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    flex-shrink: 0;
}

.chart-signal-dot.positive { background: var(--fc-green); }
.chart-signal-dot.negative { background: var(--fc-red); }
.chart-signal-dot.neutral { background: var(--fc-text-muted); }

.chart-signal-text {
    font-size: 0.68rem;
    color: var(--fc-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    transition: color 0.15s;
}

.chart-row:hover .chart-signal-text {
    color: var(--fc-text-dim);
}

/* Score colors — clinical, no glow */
.score-high { color: var(--fc-green); }
.score-mid { color: var(--fc-gold); }
.score-low-mid { color: var(--fc-orange); }
.score-low { color: var(--fc-red); }

/* Expanded row detail (on click/hover) */
.chart-row-detail {
    display: none;
    grid-column: 1 / -1;
    padding: 0 1rem 0.75rem;
    background: var(--fc-surface-2);
}

.chart-row-detail.open {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; max-height: 0; }
    to { opacity: 1; max-height: 200px; }
}

.chart-detail-block {
    padding: 0.6rem 0;
}

.chart-detail-label {
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--fc-text-muted);
    margin-bottom: 0.35rem;
}

.chart-detail-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--fc-text);
    font-variant-numeric: tabular-nums;
}

.chart-detail-sparkline {
    height: 32px;
    width: 100%;
}

/* ---- Forecast Widget (for trade-detail page) ---- */

.forecast-widget {
    background: var(--fc-surface);
    border: 1px solid var(--fc-border);
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-bottom: 2rem;
}

.forecast-widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.forecast-widget-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 800;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.forecast-widget-badge {
    font-size: 0.6rem;
    font-weight: 600;
    padding: 0.12rem 0.4rem;
    border-radius: 3px;
    background: rgba(0, 230, 118, 0.08);
    border: 1px solid rgba(0, 230, 118, 0.15);
    color: var(--fc-accent);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.forecast-widget-body {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.forecast-widget-score {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.5rem;
    font-weight: 900;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.forecast-widget-meta {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.forecast-widget-change {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.forecast-widget-change.green { color: var(--fc-green); }
.forecast-widget-change.red { color: var(--fc-red); }
.forecast-widget-change.neutral { color: var(--fc-text-muted); }

.forecast-widget-outlook {
    font-size: 0.75rem;
    color: var(--fc-text-dim);
}

.forecast-widget-sparkline {
    flex: 1;
    height: 50px;
    min-width: 120px;
}

.forecast-widget-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--fc-accent);
    text-decoration: none;
    margin-top: 0.75rem;
    transition: opacity 0.15s;
}

.forecast-widget-link:hover {
    opacity: 0.7;
}

/* ---- Score Breakdown (dimension bars inside widget) ---- */

.forecast-widget-breakdown {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--fc-border);
}

.forecast-breakdown-title {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--fc-text-muted);
    margin-bottom: 0.65rem;
}

.forecast-dimension-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.3rem 0;
}

.forecast-dimension-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--fc-text-dim);
    min-width: 110px;
    white-space: nowrap;
    text-transform: lowercase;
}

.forecast-dimension-bar-wrap {
    flex: 1;
    height: 14px;
    background: var(--fc-surface-3);
    border-radius: 3px;
    overflow: hidden;
}

.forecast-dimension-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.forecast-dimension-bar.score-high {
    background: linear-gradient(90deg, rgba(0,230,118,0.15), rgba(0,230,118,0.45));
    border-right: 2px solid var(--fc-green);
}

.forecast-dimension-bar.score-mid {
    background: linear-gradient(90deg, rgba(255,202,40,0.1), rgba(255,202,40,0.35));
    border-right: 2px solid var(--fc-gold);
}

.forecast-dimension-bar.score-low-mid {
    background: linear-gradient(90deg, rgba(255,145,0,0.1), rgba(255,145,0,0.35));
    border-right: 2px solid var(--fc-orange);
}

.forecast-dimension-bar.score-low {
    background: linear-gradient(90deg, rgba(255,61,113,0.1), rgba(255,61,113,0.35));
    border-right: 2px solid var(--fc-red);
}

.forecast-dimension-score {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.85rem;
    font-weight: 800;
    min-width: 2ch;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 768px) {
    .forecast-dimension-label {
        min-width: 80px;
        font-size: 0.65rem;
    }
    .forecast-dimension-bar-wrap {
        height: 10px;
    }
    .forecast-dimension-score {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .forecast-dimension-row {
        gap: 0.5rem;
    }
    .forecast-dimension-label {
        min-width: 70px;
        font-size: 0.6rem;
    }
}

/* Outlook badge used in widget */
.forecast-outlook {
    font-size: 0.62rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: 3px;
    text-transform: lowercase;
    white-space: nowrap;
    flex-shrink: 0;
}

.forecast-outlook.locked-in {
    background: rgba(0, 230, 118, 0.1);
    color: var(--fc-green);
}

.forecast-outlook.solid {
    background: rgba(0, 230, 118, 0.08);
    color: var(--fc-green);
}

.forecast-outlook.mid {
    background: rgba(255, 202, 40, 0.08);
    color: var(--fc-gold);
}

.forecast-outlook.shaky {
    background: rgba(255, 145, 0, 0.08);
    color: var(--fc-orange);
}

.forecast-outlook.cooked {
    background: rgba(255, 61, 113, 0.08);
    color: var(--fc-red);
}

/* ===== CAREER PULSE VOTES ===== */

.pulse-vote-section {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.pulse-sentiment {
    font-size: 0.72rem;
    font-weight: 600;
    color: #aaa;
    margin-bottom: 0.85rem;
    font-style: italic;
    letter-spacing: 0.01em;
}

.pulse-signals {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.65rem 0.75rem;
    background: rgba(255,255,255,0.02);
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.04);
}

.pulse-sig-row {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.pulse-sig-label {
    font-size: 0.58rem;
    font-weight: 600;
    color: #444;
    text-transform: lowercase;
    letter-spacing: 0.03em;
}

.pulse-sig-value {
    font-size: 0.7rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.pulse-sig-green { color: var(--fc-green); }
.pulse-sig-red { color: var(--fc-red); }
.pulse-sig-gold { color: var(--fc-gold); }
.pulse-sig-muted { color: #666; }

.pulse-community-label {
    font-size: 0.62rem;
    font-weight: 600;
    color: #555;
    text-transform: lowercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.4rem;
}

@media (max-width: 480px) {
    .pulse-signals {
        grid-template-columns: 1fr;
        gap: 0.35rem;
    }
    .pulse-sig-row {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.pulse-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.6rem;
}

.pulse-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #888;
    text-transform: lowercase;
}

.pulse-count {
    font-size: 0.65rem;
    font-weight: 600;
    color: #555;
    font-variant-numeric: tabular-nums;
}

.pulse-bar-wrap {
    height: 6px;
    background: rgba(255,61,113,0.15);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.35rem;
}

.pulse-agree-fill {
    height: 100%;
    background: var(--fc-green);
    border-radius: 3px;
    transition: width 0.4s ease;
}

.pulse-bar-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.pulse-bar-label {
    font-size: 0.65rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.pulse-label-agree {
    color: var(--fc-green);
}

.pulse-label-disagree {
    color: var(--fc-red);
}

.pulse-buttons {
    display: flex;
    gap: 0.5rem;
}

.pulse-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.08);
    background: transparent;
    color: #666;
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
    text-transform: lowercase;
}

.pulse-btn:hover:not(:disabled) {
    border-color: rgba(255,255,255,0.15);
    color: #aaa;
}

.pulse-btn-agree:hover:not(:disabled) {
    border-color: rgba(0,230,118,0.3);
    color: var(--fc-green);
    background: rgba(0,230,118,0.04);
}

.pulse-btn-disagree:hover:not(:disabled) {
    border-color: rgba(255,61,113,0.3);
    color: var(--fc-red);
    background: rgba(255,61,113,0.04);
}

.pulse-btn.voted {
    pointer-events: none;
}

.pulse-btn-agree.voted {
    border-color: rgba(0,230,118,0.3);
    color: var(--fc-green);
    background: rgba(0,230,118,0.06);
}

.pulse-btn-disagree.voted {
    border-color: rgba(255,61,113,0.3);
    color: var(--fc-red);
    background: rgba(255,61,113,0.06);
}

.pulse-btn:disabled:not(.voted) {
    opacity: 0.35;
    cursor: default;
}

.pulse-btn svg {
    flex-shrink: 0;
}

/* Compact pulse for chart rows */
.chart-pulse {
    font-size: 0.6rem;
    font-weight: 700;
    color: #555;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.chart-pulse-icon {
    color: var(--fc-green);
    font-size: 0.5rem;
}

@media (max-width: 480px) {
    .pulse-buttons {
        flex-direction: column;
        gap: 0.35rem;
    }
}

/* ===== SCORE HISTORY DEEP DIVE ===== */

.score-history-section {
    margin: 0 2rem;
    padding: 0;
}

.score-history {
    background: #0f0f11;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    padding: 1.5rem;
}

.score-history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.score-history-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.01em;
}

.score-history-periods {
    display: flex;
    gap: 0;
    border-radius: 8px;
    background: #0a0a0a;
    border: 1px solid rgba(255,255,255,0.06);
    padding: 2px;
    overflow: hidden;
}

.history-period-btn {
    padding: 0.35rem 0.75rem;
    border: none;
    background: transparent;
    color: #555;
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.15s;
    letter-spacing: 0.02em;
}

.history-period-btn:hover {
    color: #888;
}

.history-period-btn.active {
    background: #141418;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.08);
}

.score-history-chart-wrap {
    position: relative;
    margin-bottom: 1.25rem;
}

.score-history-canvas {
    width: 100%;
    height: 280px;
    display: block;
    cursor: crosshair;
}

.score-history-tooltip {
    position: absolute;
    background: #1a1a1f;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    pointer-events: none;
    z-index: 10;
    min-width: 80px;
    display: none;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.history-tooltip-date {
    font-size: 0.65rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 0.15rem;
    text-transform: lowercase;
}

.history-tooltip-score {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.history-tooltip-dim {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.65rem;
    font-weight: 600;
    color: #888;
    margin-top: 0.15rem;
    font-variant-numeric: tabular-nums;
}

.history-tooltip-compare {
    font-size: 0.7rem;
    font-weight: 600;
    margin-top: 0.2rem;
    font-variant-numeric: tabular-nums;
}

.dim-swatch {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.score-history-controls {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.score-history-dims {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
}

.history-dim-toggle {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    transition: color 0.15s;
    user-select: none;
}

.history-dim-toggle:hover {
    color: #888;
}

.history-dim-toggle input {
    display: none;
}

.history-dim-toggle input:checked + .dim-swatch {
    box-shadow: 0 0 0 2px currentColor;
}

.history-dim-toggle:has(input:checked) {
    color: #ccc;
}

.score-history-compare {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.history-compare-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #555;
    white-space: nowrap;
}

.history-compare-select {
    background: #0a0a0a;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    color: #999;
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.4rem 0.75rem;
    max-width: 200px;
    cursor: pointer;
    transition: border-color 0.15s;
}

.history-compare-select:hover,
.history-compare-select:focus {
    border-color: rgba(255,255,255,0.15);
    outline: none;
    color: #ccc;
}

@media (max-width: 768px) {
    .score-history-section {
        margin: 0 1rem;
    }
    .score-history {
        padding: 1rem;
    }
    .score-history-canvas {
        height: 220px;
    }
    .score-history-controls {
        flex-direction: column;
        gap: 0.75rem;
    }
    .score-history-compare {
        width: 100%;
    }
    .history-compare-select {
        flex: 1;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .score-history-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    .score-history-canvas {
        height: 180px;
    }
    .score-history-dims {
        gap: 0.35rem 0.75rem;
    }
}

/* ---- Animations ---- */

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

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

/* Staggered row animation — delay set via inline style for 100+ rows */
/* Row fade-in animation */
.chart-row {
    animation: rowFadeIn 0.3s ease-out both;
}

@keyframes rowFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Chart-only professions (no detail page yet) — non-clickable */
.chart-row-lite {
    cursor: default;
    opacity: 0.65;
}

.chart-row-lite:hover {
    background: var(--fc-surface-2);
}

/* Badge: "full guide" on detail rows — green accent */
.chart-badge-guide {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.52rem;
    font-weight: 700;
    color: var(--fc-green);
    background: rgba(0, 230, 118, 0.06);
    border: 1px solid rgba(0, 230, 118, 0.18);
    padding: 0.12rem 0.5rem 0.12rem 0.35rem;
    border-radius: 100px;
    margin-left: 0.5rem;
    letter-spacing: 0.03em;
    vertical-align: middle;
    line-height: 1;
    text-transform: lowercase;
}

.chart-row:hover .chart-badge-guide {
    border-color: rgba(0, 230, 118, 0.3);
    background: rgba(0, 230, 118, 0.1);
}

.chart-badge-guide::before {
    content: '✓';
    font-size: 0.5rem;
    font-weight: 700;
}

/* Member count in chart rows */
.chart-members {
    font-size: 0.55rem;
    font-weight: 500;
    color: #444;
    font-variant-numeric: tabular-nums;
}

/* Badge: "chart only" on lite rows — subtle dashed */
.chart-badge-chartonly {
    display: inline-block;
    font-size: 0.55rem;
    font-weight: 500;
    color: #55555f;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    padding: 0.1rem 0.4rem;
    border-radius: 100px;
    margin-left: 0.5rem;
    letter-spacing: 0.02em;
    vertical-align: middle;
    line-height: 1;
}

/* ---- Watchlist Section (homepage) ---- */

.watchlist-section {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.watchlist-header {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--fc-text-muted);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.watchlist-header .watchlist-count {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--fc-gold);
    background: rgba(255, 202, 40, 0.08);
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
    font-variant-numeric: tabular-nums;
}

.watchlist-chips {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.watchlist-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.75rem;
    background: var(--fc-surface);
    border: 1px solid var(--fc-border-bright);
    border-radius: 100px;
    text-decoration: none;
    color: inherit;
    font-size: 0.78rem;
    transition: all 0.15s;
}

.watchlist-chip:hover {
    border-color: rgba(255, 202, 40, 0.3);
    transform: translateY(-1px);
}

.watchlist-chip-emoji {
    font-size: 0.9rem;
}

.watchlist-chip-name {
    font-weight: 600;
    color: var(--fc-text);
}

.watchlist-chip-score {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 800;
    font-size: 0.72rem;
    font-variant-numeric: tabular-nums;
}

.watchlist-chip-change {
    font-size: 0.65rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.watchlist-chip-change.positive { color: var(--fc-green); }
.watchlist-chip-change.negative { color: var(--fc-red); }
.watchlist-chip-change.flat { color: var(--fc-text-muted); }

.watchlist-chip-remove {
    color: var(--fc-text-muted);
    font-size: 0.65rem;
    cursor: pointer;
    padding: 0.1rem;
    line-height: 1;
    transition: color 0.15s;
    background: none;
    border: none;
    font-family: inherit;
}

.watchlist-chip-remove:hover {
    color: var(--fc-red);
}

/* Chart loading skeleton */
.chart-skeleton {
    padding: 0.5rem 0;
}
.skeleton-row {
    height: 2.5rem;
    margin: 0.25rem 1rem;
    border-radius: 6px;
    background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.03) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}
.skeleton-row:nth-child(odd) {
    opacity: 0.7;
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* "View all" expand button */
.chart-expand-row {
    display: flex;
    justify-content: center;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--fc-border);
    background: var(--fc-surface);
}

.chart-expand-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.5rem;
    border-radius: 6px;
    border: 1px solid var(--fc-border-bright);
    background: var(--fc-surface-2);
    color: var(--fc-text-dim);
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    letter-spacing: 0.02em;
}

.chart-expand-btn:hover {
    color: var(--fc-accent);
    border-color: rgba(0, 230, 118, 0.3);
    background: rgba(0, 230, 118, 0.04);
}

.chart-expand-arrow {
    font-size: 0.85rem;
    transition: transform 0.15s;
}

.chart-expand-btn:hover .chart-expand-arrow {
    transform: translateX(3px);
}

/* ---- Responsive: 1024px ---- */
@media (max-width: 1024px) {
    .chart-col-headers,
    .chart-row {
        grid-template-columns: 2rem 1fr 3rem 3rem 70px 4.5rem 0 2rem;
    }

    .chart-signal {
        display: none;
    }
}

/* ---- Responsive: 768px ---- */
@media (max-width: 768px) {
    .hero-dashboard {
        padding-top: 3.75rem;
    }

    .market-summary {
        flex-wrap: wrap;
    }

    .market-stat {
        flex: 1 1 auto;
        min-width: 0;
        padding: 0.6rem 0.75rem;
    }

    .chart-filters {
        padding: 0 0.75rem;
        margin-bottom: 0.5rem;
    }

    .filter-tab {
        padding: 0.25rem 0.5rem;
        font-size: 0.58rem;
    }

    .chart-col-headers,
    .chart-row {
        grid-template-columns: 1.5rem 1fr 2.5rem 2.5rem 60px 0 0 1.75rem;
        padding: 0 0.75rem;
    }

    .chart-outlook,
    .chart-signal {
        display: none;
    }

    .chart-score {
        font-size: 1.05rem;
    }

    .chart-change {
        font-size: 0.7rem;
    }

    .chart-sparkline-cell {
        padding: 0 0.15rem;
    }

    .chart-sparkline {
        width: 60px;
        height: 20px;
    }

    .chart-row {
        min-height: 44px;
    }

    .the-chart {
        padding: 0.5rem 0.75rem 2rem;
    }

    .forecast-section {
        padding: 1.5rem 0.75rem;
    }

    .forecast-widget-body {
        flex-direction: column;
        align-items: flex-start;
    }

    .forecast-widget-sparkline {
        width: 100%;
    }
}

/* ---- Responsive: 480px ---- */
@media (max-width: 480px) {
    .hero-dashboard .hero-h1 {
        font-size: 1.8rem;
    }

    .hero-dashboard .hero-p {
        font-size: 0.85rem;
    }

    .market-stat {
        padding: 0.5rem 0.5rem;
    }

    .market-stat-value {
        font-size: 0.95rem;
    }

    .market-stat-label {
        font-size: 0.55rem;
    }

    .chart-col-headers,
    .chart-row {
        grid-template-columns: 1.25rem 1fr 2.25rem 2.25rem 0 0 0 1.5rem;
        padding: 0 0.5rem;
    }

    .chart-trade-emoji {
        font-size: 0.9rem;
    }

    .chart-trade-name {
        font-size: 0.78rem;
    }

    .chart-trade-cat {
        display: none;
    }

    .chart-score {
        font-size: 0.92rem;
    }

    .chart-sparkline-cell {
        display: none;
    }

    .chart-row {
        min-height: 40px;
    }

    .forecast-widget-score {
        font-size: 2rem;
    }
}
