/* ===== Daily Market Pulse — CSS ===== */
/* Extends tools-shared.css design system */

/* --- Layout --- */
.pulse-main,
.pulse-hub-main {
    max-width: 820px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

.pulse-block {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 28px 32px;
    margin-bottom: 24px;
}

.pulse-block h2 {
    font-family: 'Fraunces', serif;
    font-size: 1.35rem;
    color: var(--text-primary);
    margin: 0 0 18px 0;
}

.pulse-block h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 18px 0 10px 0;
}

.pulse-meta {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    margin-top: 14px;
}

/* --- Block 1: Mood Gauge --- */
.mood-gauge-wrap {
    display: flex;
    align-items: center;
    gap: 28px;
    justify-content: center;
}

.mood-gauge {
    width: 180px;
    height: 100px;
    flex-shrink: 0;
}

.mood-arc {
    transition: stroke-dasharray 0.8s ease-out;
}

.mood-needle {
    transition: all 0.8s ease-out;
    transform-origin: 100px 100px;
}

.mood-score {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mood-value {
    font-family: 'Fraunces', serif;
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1;
}

.mood-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-top: 4px;
}

.mood-components {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

.mood-comp {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.comp-label {
    font-size: 0.72rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.comp-value {
    font-family: 'Fraunces', serif;
    font-size: 1.1rem;
    font-weight: 600;
}

.comp-value.positive { color: var(--green); }
.comp-value.negative { color: var(--red); }

/* --- Block 2: AI Summary --- */
.ai-summary {
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--text-primary);
    border-left: 3px solid var(--gold-primary);
    padding-left: 16px;
    margin: 0;
    font-style: normal;
}

/* --- Block 3: Risk Badge --- */
.risk-badge {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 6px 16px;
    border-radius: 6px;
}

.risk-riskon {
    background: var(--green-bg);
    color: var(--green);
    border: 1px solid var(--green);
}

.risk-riskoff {
    background: var(--red-bg);
    color: var(--red);
    border: 1px solid var(--red);
}

.risk-mixed {
    background: #FFFBEB;
    color: #B8960C;
    border: 1px solid #D4AF37;
}

.risk-reason {
    margin-top: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.todays-edge,
.traders-take {
    margin-top: 18px;
    padding: 14px 16px;
    background: var(--bg-cream);
    border-radius: 8px;
    border-left: 3px solid var(--gold-primary);
}

.todays-edge h3,
.traders-take h3 {
    margin: 0 0 6px 0;
    font-size: 0.85rem;
    color: var(--gold-dark);
}

.todays-edge p,
.traders-take p {
    margin: 0;
    color: var(--text-primary);
    line-height: 1.5;
}

/* --- Block 4: Signal Preview --- */
.signal-counts {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.sig-count {
    flex: 1;
    text-align: center;
    padding: 14px;
    border-radius: 10px;
}

.sig-count.sig-buy {
    background: var(--green-bg);
}

.sig-count.sig-sell {
    background: var(--red-bg);
}

.sig-num {
    display: block;
    font-family: 'Fraunces', serif;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.sig-buy .sig-num { color: var(--green); }
.sig-sell .sig-num { color: var(--red); }

.sig-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 4px;
    display: block;
}

.signal-picks {
    margin-bottom: 16px;
}

.pick-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-light);
}

.pick-row:last-child {
    border-bottom: none;
}

.pick-ticker {
    font-weight: 700;
    font-size: 0.95rem;
    min-width: 70px;
}

.pick-score {
    font-family: 'Fraunces', serif;
    font-size: 0.95rem;
    color: var(--text-secondary);
    min-width: 40px;
}

.pick-signal {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 4px;
    margin-left: auto;
}

.pick-buy, .pick-strong_buy {
    background: var(--green-bg);
    color: var(--green);
}

.pick-sell {
    background: var(--red-bg);
    color: var(--red);
}

.pick-blurred {
    filter: blur(5px);
    user-select: none;
    pointer-events: none;
    opacity: 0.5;
}

.signal-cta {
    display: block;
    text-align: center;
    padding: 12px;
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    color: #fff;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: opacity 0.2s;
}

.signal-cta:hover {
    opacity: 0.9;
}

/* --- News Synthesis ("Our Take") --- */
.news-synthesis {
    background: var(--bg-cream);
    border-left: 3px solid var(--gold-primary);
    border-radius: 0 8px 8px 0;
    padding: 16px 18px;
    margin-bottom: 20px;
}

.news-synthesis h3 {
    margin: 0 0 6px 0;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--gold-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-synthesis p {
    margin: 0;
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* --- Block 5: Headlines --- */
.headline-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.headline-card {
    padding: 14px 16px;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    transition: border-color 0.2s;
}

.headline-card:hover {
    border-color: var(--gold-primary);
}

.headline-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.headline-source {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.region-badge {
    background: var(--blue-bg);
    color: var(--blue);
    font-size: 0.65rem;
    padding: 1px 5px;
    border-radius: 3px;
    font-weight: 700;
}

.headline-title {
    font-size: 0.95rem;
    margin: 0 0 6px 0;
    line-height: 1.4;
}

.headline-title a {
    color: var(--text-primary);
    text-decoration: none;
}

.headline-title a:hover {
    color: var(--gold-dark);
}

.headline-insight {
    font-size: 0.84rem;
    color: var(--text-secondary);
    margin: 0 0 6px 0;
    line-height: 1.45;
    font-style: italic;
}

.headline-tickers {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.ticker-tag {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--gold-dark);
    background: rgba(212, 175, 55, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

.light-news {
    padding: 24px;
    text-align: center;
    color: var(--text-tertiary);
    background: var(--bg-cream);
    border-radius: 8px;
}

/* --- Block 6: Sector Bars --- */
.rotation-alert {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--gold-dark);
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.25);
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.sector-bars {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sector-bar-row {
    display: grid;
    grid-template-columns: 160px 1fr 60px 70px;
    align-items: center;
    gap: 10px;
    padding: 4px 0;
}

.sector-name {
    font-size: 0.84rem;
    color: var(--text-primary);
    font-weight: 500;
}

.sector-bar-track {
    height: 14px;
    background: var(--bg-cream);
    border-radius: 7px;
    overflow: hidden;
}

.sector-bar-fill {
    height: 100%;
    border-radius: 7px;
    transition: width 0.6s ease-out;
}

.bar-green { background: var(--green); }
.bar-red { background: var(--red); }

.sector-perf {
    font-family: 'Fraunces', serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: right;
}

.sector-perf.positive { color: var(--green); }
.sector-perf.negative { color: var(--red); }

.sector-label-badge {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    padding: 2px 8px;
    border-radius: 4px;
}

.label-hot { background: var(--green-bg); color: var(--green); }
.label-cold { background: var(--red-bg); color: var(--red); }
.label-neutral { background: var(--bg-cream); color: var(--text-tertiary); }

/* --- Block 7: Calendar --- */
.calendar-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.calendar-event {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--border-light);
    border-radius: 10px;
}

.calendar-event.event-high {
    border-color: var(--red);
    background: var(--red-bg);
}

.event-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 70px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    gap: 2px;
}

.event-icon {
    font-size: 1.3rem;
}

.event-time {
    font-size: 0.72rem;
    color: var(--text-tertiary);
}

.event-details h3 {
    margin: 0 0 4px 0;
    font-size: 0.92rem;
}

.event-why {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.45;
}

.event-importance {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--red);
    letter-spacing: 0.5px;
    white-space: nowrap;
    margin-left: auto;
    flex-shrink: 0;
}

/* --- Block 8: CTA --- */
.cta-block .cta-banner {
    border: none;
    margin: 0;
}

.cta-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 20px 0 12px;
    flex-wrap: wrap;
}

.cta-btn img {
    height: 42px;
    width: auto;
}

.cta-secondary {
    text-align: center;
    margin-top: 8px;
}

.cta-secondary a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.88rem;
}

.cta-secondary a:hover {
    color: #fff;
}

/* --- Navigation (prev/next) --- */
.pulse-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-top: 12px;
}

.pulse-nav-link {
    color: var(--gold-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
}

.pulse-nav-link:hover {
    color: var(--gold-primary);
}

/* ===== HUB PAGE ===== */

.hub-section {
    margin-bottom: 32px;
}

.hub-section h2 {
    font-family: 'Fraunces', serif;
    font-size: 1.25rem;
    margin-bottom: 16px;
}

/* Hub latest card */
.hub-latest-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 24px;
}

.hub-mood {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.hub-mood-score {
    font-family: 'Fraunces', serif;
    font-size: 2.2rem;
    font-weight: 700;
}

.hub-mood-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.hub-risk-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 5px;
    letter-spacing: 0.5px;
}

.hub-summary p {
    color: var(--text-secondary);
    line-height: 1.55;
    margin: 0 0 14px 0;
}

.hub-stats {
    display: flex;
    gap: 16px;
    font-size: 0.84rem;
    color: var(--text-tertiary);
    margin-bottom: 14px;
}

.hub-read-more {
    color: var(--gold-dark);
    font-weight: 600;
    text-decoration: none;
}

.hub-read-more:hover {
    color: var(--gold-primary);
}

/* Weekly highlights */
.weekly-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.weekly-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 16px;
    text-align: center;
}

.weekly-label {
    display: block;
    font-size: 0.72rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.weekly-value {
    font-family: 'Fraunces', serif;
    font-size: 1.3rem;
    font-weight: 600;
}

.weekly-value.positive { color: var(--green); }
.weekly-value.negative { color: var(--red); }
.weekly-value.neutral { color: var(--gold-primary); }

/* Sparkline */
.mood-sparkline {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    margin-top: 14px;
    padding: 10px 14px;
    background: var(--bg-cream);
    border-radius: 8px;
}

.sparkline-label {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-right: 8px;
    align-self: center;
}

.spark-dot {
    display: flex;
    align-items: flex-end;
    width: 18px;
}

.spark-bar {
    display: block;
    width: 100%;
    min-height: 3px;
    border-radius: 3px 3px 0 0;
}

.spark-green .spark-bar { background: var(--green); }
.spark-red .spark-bar { background: var(--red); }
.spark-neutral .spark-bar { background: var(--gold-primary); }

/* Pulse list */
.pulse-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pulse-list-item {
    display: grid;
    grid-template-columns: 100px 160px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 12px 16px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    text-decoration: none;
    transition: border-color 0.2s;
}

.pulse-list-item:hover {
    border-color: var(--gold-primary);
}

.pulse-date {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
}

.pulse-mood-badge {
    font-size: 0.82rem;
    font-weight: 500;
}

.pulse-summary-short {
    font-size: 0.82rem;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pulse-tickers {
    font-size: 0.78rem;
    color: var(--gold-dark);
    font-weight: 600;
}

/* Monthly archive */
.monthly-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.monthly-toggle {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    text-align: left;
    transition: border-color 0.2s;
}

.monthly-toggle:hover {
    border-color: var(--gold-primary);
}

.monthly-name {
    font-weight: 600;
    min-width: 120px;
}

.monthly-count {
    color: var(--text-tertiary);
    font-size: 0.82rem;
}

.monthly-mood {
    font-family: 'Fraunces', serif;
    font-size: 0.85rem;
    font-weight: 600;
}

.monthly-mood.positive { color: var(--green); }
.monthly-mood.negative { color: var(--red); }

.monthly-tickers {
    color: var(--gold-dark);
    font-size: 0.8rem;
    margin-left: auto;
}

.monthly-arrow {
    color: var(--text-tertiary);
    font-size: 0.7rem;
    transition: transform 0.2s;
}

.monthly-item.open .monthly-arrow {
    transform: rotate(180deg);
}

/* ===== Responsive ===== */
@media (max-width: 700px) {
    .pulse-block {
        padding: 20px 16px;
    }

    .mood-gauge-wrap {
        flex-direction: column;
        gap: 12px;
    }

    .mood-components {
        grid-template-columns: repeat(2, 1fr);
    }

    .signal-counts {
        flex-direction: column;
        gap: 10px;
    }

    .sector-bar-row {
        grid-template-columns: 100px 1fr 50px 55px;
        gap: 6px;
    }

    .sector-name {
        font-size: 0.76rem;
    }

    .calendar-event {
        flex-direction: column;
        gap: 8px;
    }

    .event-date {
        flex-direction: row;
        gap: 8px;
    }

    .pulse-list-item {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .pulse-summary-short {
        display: none;
    }

    .weekly-grid {
        grid-template-columns: 1fr;
    }
}
