/* C.7 — Pivot-aware source cards with goal-fit rationale */

/* ── Source type color tokens ────────────────────────────────────────────── */
:root {
    --sc-case-law:    #6366f1;
    --sc-legislation: #64748b;
    --sc-doctrine:    #d97706;
    --sc-regulatory:  #0d9488;
    --sc-journal:     #9333ea;
    --sc-other:       #6b7280;
}

/* ── Card list ───────────────────────────────────────────────────────────── */
.source-cards-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 10px;
}

/* ── Card ────────────────────────────────────────────────────────────────── */
article.source-card {
    background: var(--ip-bg-surface, #1E2128);
    border: 1px solid var(--ip-border-light, rgba(255,255,255,0.09));
    border-radius: 8px;
    padding: 10px 12px;
    cursor: default;
    transition: border-color 0.15s;
}

article.source-card:focus-visible,
article.source-card:hover {
    border-color: var(--ip-border, rgba(255,255,255,0.20));
    outline: none;
}

/* ── Header ──────────────────────────────────────────────────────────────── */
.source-card__header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 5px;
    flex-wrap: wrap;
}

/* Source type badge */
.source-type {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #fff;
    flex-shrink: 0;
}
.source-type--case-law    { background: var(--sc-case-law,    #6366f1); }
.source-type--legislation { background: var(--sc-legislation, #64748b); }
.source-type--doctrine    { background: var(--sc-doctrine,    #d97706); }
.source-type--regulatory  { background: var(--sc-regulatory,  #0d9488); }
.source-type--journal     { background: var(--sc-journal,     #9333ea); }
.source-type--other       { background: var(--sc-other,       #6b7280); }

/* Freshness chip */
.source-card__freshness {
    font-size: 10px;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 4px;
    flex-shrink: 0;
    cursor: help;
}
.freshness--current    { background: rgba(61,187,158,0.2);  color: #3DBB9E; }
.freshness--dated      { background: rgba(229,162,53,0.2);  color: #E5A235; }
.freshness--stale      { background: rgba(229,130,53,0.2);  color: #E58235; }
.freshness--retracted  { background: rgba(229,87,79,0.15);  color: #E5574F; text-decoration: line-through; }
.freshness--superseded { background: rgba(150,150,150,0.15); color: #9A9890; }

/* Relevance bar — pivot-specific, never a trust score */
.source-card__relevance {
    flex: 1;
    min-width: 36px;
    max-width: 72px;
    height: 4px;
    background: var(--ip-bg-surface-alt, #252930);
    border-radius: 2px;
    overflow: hidden;
    cursor: help;
    margin-left: auto;
    align-self: center;
}
.source-card__relevance-bar {
    display: block;
    height: 100%;
    background: var(--ip-accent, #5B8EC9);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* ── Title ───────────────────────────────────────────────────────────────── */
.source-card__title {
    margin: 0 0 4px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
}
.source-card__title a {
    color: var(--ip-text-primary, #EDEDEB);
    text-decoration: none;
}
.source-card__title a:hover,
.source-card__title a:focus-visible {
    color: var(--ip-accent-light, #7BAAD8);
    text-decoration: underline;
    outline: none;
}

/* ── Snippet ─────────────────────────────────────────────────────────────── */
.source-card__snippet {
    margin: 0 0 6px;
    font-size: 11px;
    color: var(--ip-text-secondary, #C0BEB6);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
.source-card__footer {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid var(--ip-border-light, rgba(255,255,255,0.06));
}

/* Pivot rationale */
.pivot-rationale {
    margin: 0;
    font-size: 11px;
    color: var(--ip-text-secondary, #C0BEB6);
    line-height: 1.45;
}
.pivot-rationale strong {
    color: var(--ip-text-primary, #EDEDEB);
    font-weight: 600;
}

/* Chips row */
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.chip {
    font-size: 10px;
    font-weight: 500;
    padding: 2px 7px;
    border-radius: 4px;
    border: 1px solid transparent;
}

/* Verdict */
.chip--verdict-supported             { background: rgba(61,187,158,0.15);  color: #3DBB9E; border-color: rgba(61,187,158,0.30); }
.chip--verdict-refuted               { background: rgba(229,87,79,0.15);   color: #E5574F; border-color: rgba(229,87,79,0.30); }
.chip--verdict-insufficient_evidence { background: rgba(229,162,53,0.15);  color: #E5A235; border-color: rgba(229,162,53,0.30); }

/* Credibility */
.chip--credibility-high         { background: rgba(91,142,201,0.15);  color: var(--ip-accent-light, #7BAAD8); border-color: rgba(91,142,201,0.30); }
.chip--credibility-medium       { background: rgba(150,145,175,0.12); color: var(--ip-text-secondary, #C0BEB6); border-color: rgba(150,145,175,0.25); }
.chip--credibility-low          { background: rgba(229,162,53,0.12);  color: #E5A235; border-color: rgba(229,162,53,0.25); }
.chip--credibility-unverifiable { background: rgba(150,150,150,0.10); color: var(--ip-text-muted, #787670); border-color: rgba(150,150,150,0.20); }

/* Graph-source */
.chip--graph {
    background: rgba(61,187,158,0.12);
    color: #3DBB9E;
    border-color: rgba(61,187,158,0.25);
}
