﻿/* ============================================================
   previews.css — Earnings Previews (EW2027).
   Uses ew-theme.css tokens. Dark-mode aware. Prefix: pv-
   ============================================================ */

.pv-page {
    --pv-gold: var(--ew-gold, var(--ew-color, #DDB785));
    --pv-line: var(--border, #e3e3e3);
    --pv-soft: color-mix(in srgb, var(--text, #333) 5%, transparent);
    max-width: 860px;
    margin: 0 auto;
    padding: 1.5rem 1rem 4rem;
}

    .pv-page :is(a, button):focus-visible {
        outline: 2px solid var(--pv-gold);
        outline-offset: 2px;
    }

/* ---- Header ---- */
.pv-head {
    margin-bottom: 1.75rem;
}

.pv-title {
    font-size: clamp(1.6rem, 3.4vw, 2.3rem);
    font-weight: 800;
    color: var(--text);
    margin: 0 0 .3rem;
}

.pv-sub {
    font-size: .95rem;
    color: var(--text-muted);
    margin: 0 0 .9rem;
    max-width: 62ch;
}

.pv-rss {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .82rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    padding: .35rem .75rem;
    border: 1px solid var(--pv-line);
    border-radius: 999px;
    transition: border-color 120ms ease, color 120ms ease;
}

    .pv-rss svg {
        width: 15px;
        height: 15px;
        color: #f26522; /* the RSS orange is the recognizable part */
    }

    .pv-rss:hover {
        border-color: var(--pv-gold);
        color: var(--pv-gold);
    }

.pv-empty {
    color: var(--text-muted);
    text-align: center;
    padding: 3rem 1rem;
    border: 1px dashed var(--pv-line);
    border-radius: 12px;
}

/* ---- Day heading ---- */
.pv-day {
    font-size: .8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-muted);
    margin: 2rem 0 .75rem;
    padding-bottom: .4rem;
    border-bottom: 1px solid var(--pv-line);
}

    .pv-day:first-child {
        margin-top: 0;
    }

/* ---- Preview card ---- */
.pv-list {
    display: flex;
    flex-direction: column;
}

.pv-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 1rem;
    padding: 1.1rem 0;
    border-bottom: 1px solid var(--pv-line);
    scroll-margin-top: 5rem; /* clears the fixed nav when linked to from the feed */
}

    .pv-card:target {
        background: color-mix(in srgb, var(--pv-gold) 10%, transparent);
        border-radius: 10px;
        padding-left: .75rem;
        padding-right: .75rem;
    }

    .pv-card:last-child {
        border-bottom: 0;
    }

.pv-card-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .4rem;
    width: 72px;
    text-decoration: none;
    color: inherit;
}

.pv-logo {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #fff center / 76% no-repeat;
    border: 1px solid var(--pv-line);
}

.pv-id {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 0;
    width: 100%;
}

.pv-ticker {
    font-size: .85rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1.2;
}

.pv-card-link:hover .pv-ticker {
    color: var(--pv-gold);
}

.pv-company {
    font-size: .68rem;
    color: var(--text-muted);
    line-height: 1.2;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pv-body {
    min-width: 0;
}

.pv-headline {
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.35;
    margin: 0 0 .4rem;
}

    .pv-headline a {
        color: var(--text);
        text-decoration: none;
    }

        .pv-headline a:hover {
            color: var(--pv-gold);
        }

.pv-excerpt p {
    margin: 0 0 .5rem;
    font-size: .92rem;
    line-height: 1.6;
    color: var(--text);
}

.pv-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    margin: 0;
    font-size: .78rem;
    color: var(--text-muted);
}

.pv-more {
    margin-left: auto;
    font-weight: 700;
    color: var(--pv-gold);
    text-decoration: none;
    white-space: nowrap;
}

    .pv-more:hover {
        text-decoration: underline;
        text-underline-offset: 3px;
    }

.pv-when {
    font-weight: 700;
    padding: .1rem .4rem;
    border-radius: 4px;
    background: var(--pv-soft);
}

.pv-unconfirmed {
    font-style: italic;
}

/* ---- Responsive ---- */
@media (max-width: 620px) {
    .pv-page {
        padding: 1rem .75rem 3rem;
    }

    .pv-card {
        grid-template-columns: auto minmax(0, 1fr);
        gap: .75rem;
    }

    .pv-card-link {
        width: 48px;
    }

    .pv-logo {
        width: 40px;
        height: 40px;
    }

    .pv-company {
        display: none; /* the full name is already in the headline area */
    }

    .pv-headline {
        font-size: 1rem;
    }
}
