/* ── Finryse snapshot card (FIN-987) ──────────────────────────────────────
   One per featured company in the weekly earnings post, filled at publish
   from the company's public page data. Band colours are the app's FinScore
   bands (GradeBadge: 80 / 60 / 40 / 20); the green and yellow TEXT steps are
   darkened so the big number stays >= 4.5:1 on its tint. Every score is also
   printed as a number, so colour is never the only signal.
   Linked from <head> by earnings/snapshot.py only on posts that carry a card;
   bump ?v= there when this file changes (Cloudflare caches static assets). */
.fr-snap {
    --fr-ink: #0f172a;
    --fr-ink-2: #475569;
    --fr-ink-3: #64748b;
    --fr-line: #e2e8f0;
    display: block;
    margin: 1.5rem 0 0;
    padding: 1.125rem 1.25rem 1rem;
    background: #fff;
    border: 1px solid var(--fr-line);
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    color: var(--fr-ink);
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.fr-snap:hover {
    border-color: #7dd3fc;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}
.fr-snap:focus-visible {
    outline: 2px solid var(--color-accent, #0ea5e9);
    outline-offset: 3px;
}

.fr-snap-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 0.875rem;
}
.fr-snap-eyebrow {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #0369a1;
}
.fr-snap-asof {
    font-size: 0.75rem;
    color: var(--fr-ink-3);
}

.fr-snap-body {
    display: grid;
    grid-template-columns: 7.5rem 1fr;
    gap: 1.25rem;
    align-items: center;
}
.fr-snap-overall {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 1rem 0.5rem;
    border-radius: 10px;
    background: var(--fr-tint);
}
.fr-snap-overall-label {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--fr-ink-2);
}
.fr-snap-overall-val {
    font-size: 2.75rem;
    line-height: 1;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--fr-text);
}

/* One grid for all rows, so the name column is exactly as wide as the
   longest name and every bar starts at the same x. */
.fr-snap-layers {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: max-content 1fr 2rem;
    align-items: center;
    gap: 0.5rem 1rem;
    font-size: 0.8125rem;
    line-height: 1.2;
}
.fr-snap-layer {
    display: contents;
}
.fr-snap-layer-name {
    color: var(--fr-ink-2);
}
.fr-snap-track {
    display: block;
    height: 6px;
    border-radius: 999px;
    background: var(--fr-tint);
    overflow: hidden;
}
.fr-snap-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--fr-fill);
}
.fr-snap-layer-val {
    text-align: right;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--fr-ink);
}

.fr-snap-foot {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 0.875rem;
    border-top: 1px solid var(--fr-line);
}
.fr-snap-stats {
    display: flex;
    gap: 1.5rem;
    margin: 0;
}
.fr-snap-stats div {
    margin: 0;
}
.fr-snap-stats dt {
    font-size: 0.6875rem;
    color: var(--fr-ink-3);
    margin-bottom: 0.125rem;
}
.fr-snap-stats dd {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--fr-ink);
}
.fr-snap-cta {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #0369a1;
}
.fr-snap-cta span {
    display: inline-block;
    transition: transform 0.15s ease;
}
.fr-snap:hover .fr-snap-cta span {
    transform: translateX(3px);
}

/* Weekly Calendar: company names link to their Finryse page. */
.fr-cal-link {
    color: #0369a1;
    text-decoration: none;
}
.fr-cal-link:hover {
    text-decoration: underline;
}

/* Bands — the app's FinScore colours. */
.fr-band-5 { --fr-fill: #016B1D; --fr-text: #016B1D; --fr-tint: rgba(1, 107, 29, 0.10); }
.fr-band-4 { --fr-fill: #2E9E44; --fr-text: #1F7A33; --fr-tint: rgba(46, 158, 68, 0.12); }
.fr-band-3 { --fr-fill: #B8860B; --fr-text: #8A6508; --fr-tint: rgba(184, 134, 11, 0.12); }
.fr-band-2 { --fr-fill: #C2410C; --fr-text: #C2410C; --fr-tint: rgba(194, 65, 12, 0.10); }
.fr-band-1 { --fr-fill: #A23544; --fr-text: #A23544; --fr-tint: rgba(162, 53, 68, 0.10); }
.fr-band-0 { --fr-fill: #cbd5e1; --fr-text: #64748b; --fr-tint: #f1f5f9; }

@media (max-width: 640px) {
    .fr-snap {
        padding: 1rem;
    }
    .fr-snap-body {
        grid-template-columns: 1fr;
        gap: 0.875rem;
    }
    .fr-snap-overall {
        flex-direction: row;
        justify-content: space-between;
        padding: 0.625rem 1rem;
    }
    .fr-snap-overall-val {
        font-size: 2.25rem;
    }
    .fr-snap-layers {
        grid-template-columns: max-content 1fr 1.75rem;
        gap: 0.5rem 0.875rem;
    }
    .fr-snap-foot {
        flex-direction: column;
        align-items: stretch;
    }
    .fr-snap-stats {
        justify-content: space-between;
        gap: 0.75rem;
    }
    .fr-snap-cta {
        display: block;
        width: 100%;
        padding: 0.75rem 1rem;
        border-radius: 8px;
        background: #0369a1;
        color: #fff;
        text-align: center;
    }
}
