/* ── Source Library Page ─────────────────────────────────────────── */

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'EB Garamond', Georgia, serif;
    background: #1a1a2e;
    color: #e0e0e0;
    min-height: 100vh;
}

/* ── Header ──────────────────────────────────────────────────────── */

.sources-header {
    background: #16213e;
    padding: 28px 32px 20px;
    border-bottom: 1px solid #0f3460;
    text-align: center;
}

.sources-header h1 {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 28px;
    font-weight: 600;
    color: #c9a84c;
    margin-bottom: 6px;
}

.sources-header .subtitle {
    font-size: 15px;
    color: #8a8a9a;
    margin-bottom: 14px;
}

.sources-nav {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.sources-nav a {
    color: #c9a84c;
    text-decoration: none;
    font-family: 'Cinzel', Georgia, serif;
    font-size: 13px;
    letter-spacing: 0.5px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.sources-nav a:hover {
    background: rgba(201, 168, 76, 0.15);
}

/* ── Stats Bar ───────────────────────────────────────────────────── */

.sources-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
    padding: 20px 32px;
    background: #16213e;
    border-bottom: 1px solid #0f3460;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 28px;
    font-weight: 700;
    color: #c9a84c;
    display: block;
}

.stat-label {
    font-size: 12px;
    color: #8a8a9a;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ── Category Filter ─────────────────────────────────────────────── */

.sources-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 18px 32px;
    background: #1a1a2e;
    border-bottom: 1px solid rgba(201, 168, 76, 0.12);
}

.filter-pill {
    background: rgba(201, 168, 76, 0.08);
    border: 1px solid rgba(201, 168, 76, 0.2);
    color: #c9a84c;
    font-family: 'Cinzel', Georgia, serif;
    font-size: 12px;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.3px;
}

.filter-pill:hover {
    background: rgba(201, 168, 76, 0.15);
    border-color: rgba(201, 168, 76, 0.4);
}

.filter-pill.active {
    background: #c9a84c;
    color: #1a1a2e;
    font-weight: 600;
}

/* ── Main Container ──────────────────────────────────────────────── */

.sources-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 24px 24px 60px;
}

/* ── Category Section ────────────────────────────────────────────── */

.category-section {
    margin-bottom: 36px;
}

.category-heading {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 18px;
    font-weight: 600;
    color: #c9a84c;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(201, 168, 76, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-count {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 13px;
    font-weight: 400;
    color: #8a8a9a;
}

/* ── Source Card ──────────────────────────────────────────────────── */

.source-card {
    background: #16213e;
    border: 1px solid #0f3460;
    border-radius: 8px;
    padding: 18px 20px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.source-card:hover {
    border-color: rgba(201, 168, 76, 0.3);
    background: #1a2744;
}

.source-card.expanded {
    border-color: rgba(201, 168, 76, 0.4);
}

.source-card-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.source-card-main {
    flex: 1;
    min-width: 0;
}

.source-title {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 16px;
    font-weight: 600;
    color: #e0e0e0;
    margin-bottom: 3px;
    line-height: 1.3;
}

.source-card.highlight .source-title {
    color: #c9a84c;
}

.source-author {
    font-size: 14px;
    color: #8a8a9a;
    font-style: italic;
}

.source-year {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 13px;
    color: #c9a84c;
    white-space: nowrap;
    opacity: 0.7;
    min-width: 50px;
    text-align: right;
}

.source-expand-arrow {
    color: #8a8a9a;
    font-size: 12px;
    transition: transform 0.2s;
    margin-top: 4px;
}

.source-card.expanded .source-expand-arrow {
    transform: rotate(180deg);
}

/* ── Source Detail (expanded) ────────────────────────────────────── */

.source-detail {
    display: none;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(201, 168, 76, 0.1);
}

.source-card.expanded .source-detail {
    display: block;
}

.source-description {
    font-size: 15px;
    line-height: 1.6;
    color: #c0c0c0;
    margin-bottom: 12px;
}

.source-meta-row {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.source-meta-item {
    font-size: 13px;
}

.source-meta-label {
    color: #8a8a9a;
    margin-right: 4px;
}

.source-meta-value {
    color: #c9a84c;
    font-family: 'Cinzel', Georgia, serif;
    font-size: 12px;
    letter-spacing: 0.3px;
}

.source-best-for {
    background: rgba(201, 168, 76, 0.06);
    border: 1px solid rgba(201, 168, 76, 0.12);
    border-radius: 6px;
    padding: 10px 14px;
    margin-top: 10px;
    font-size: 14px;
    color: #c0c0c0;
}

.source-best-for strong {
    color: #c9a84c;
    font-family: 'Cinzel', Georgia, serif;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.source-chat-btn {
    display: inline-block;
    margin-top: 12px;
    padding: 6px 16px;
    background: rgba(201, 168, 76, 0.12);
    border: 1px solid rgba(201, 168, 76, 0.3);
    border-radius: 6px;
    color: #c9a84c;
    font-family: 'Cinzel', Georgia, serif;
    font-size: 12px;
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: all 0.2s;
}

.source-chat-btn:hover {
    background: rgba(201, 168, 76, 0.2);
    border-color: #c9a84c;
}

/* ── Competitive Callout ─────────────────────────────────────────── */

.competitive-callout {
    background: linear-gradient(135deg, rgba(201, 168, 76, 0.08), rgba(201, 168, 76, 0.03));
    border: 1px solid rgba(201, 168, 76, 0.2);
    border-radius: 10px;
    padding: 24px 28px;
    margin: 0 auto 32px;
    max-width: 960px;
    text-align: center;
}

.competitive-callout h2 {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 18px;
    color: #c9a84c;
    margin-bottom: 8px;
}

.competitive-callout p {
    font-size: 15px;
    color: #a0a0b0;
    line-height: 1.5;
}

.competitive-callout .highlight-text {
    color: #c9a84c;
    font-weight: 600;
}

/* ── Responsive ──────────────────────────────────────────────────── */

@media (max-width: 640px) {
    .sources-header { padding: 20px 16px 16px; }
    .sources-header h1 { font-size: 22px; }
    .sources-stats { gap: 20px; padding: 16px; }
    .stat-number { font-size: 22px; }
    .sources-filter { padding: 14px 16px; }
    .sources-container { padding: 16px 12px 40px; }
    .source-card { padding: 14px 16px; }
    .source-title { font-size: 14px; }
    .source-meta-row { flex-direction: column; gap: 6px; }
    .competitive-callout { padding: 18px 16px; margin: 0 12px 24px; }
}
