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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #1e293b;
    background: #ffffff;
}

/* ---- Header ---- */
header {
    background: #f1f5f9;
    padding: 2rem 1.5rem 1.5rem;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
}

header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0f172a;
}

.subtitle {
    color: #64748b;
    margin-top: 0.25rem;
    font-size: 1rem;
}

/* ---- Main ---- */
main {
    max-width: 900px;
    margin: 0 auto;
    padding: 1.5rem;
}

/* ---- Stats ---- */
.stats {
    text-align: center;
    color: #64748b;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
}

.stat-sep {
    margin: 0 0.5rem;
}

/* ---- Filters ---- */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    justify-content: center;
}

.filter-pill {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    user-select: none;
}

.filter-pill:hover {
    background: #e2e8f0;
}

.filter-pill.active {
    color: #ffffff;
    border-color: transparent;
}

/* ---- Article cards ---- */
.article-card {
    border: 1px solid #e2e8f0;
    border-left: 4px solid #94a3b8;
    border-radius: 6px;
    padding: 1rem 1.25rem;
    margin-bottom: 0.875rem;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.15s;
}

.article-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.article-title {
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.35rem;
}

.article-title a {
    color: #0f172a;
    text-decoration: none;
}

.article-title a:hover {
    color: #2563eb;
    text-decoration: underline;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
}

.source-tag {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.7rem;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.article-date {
    color: #94a3b8;
}

.article-summary {
    color: #475569;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ---- Source colors ---- */
.source-pma             { background: #7c3aed; }
.source-andrew_chen     { background: #059669; }
.source-intercom        { background: #2563eb; }
.source-hubspot         { background: #ea580c; }
.source-saastr          { background: #0891b2; }
.source-lenny           { background: #dc2626; }
.source-growth_unhinged { background: #4f46e5; }
.source-chartmogul      { background: #0d9488; }

.border-pma             { border-left-color: #7c3aed; }
.border-andrew_chen     { border-left-color: #059669; }
.border-intercom        { border-left-color: #2563eb; }
.border-hubspot         { border-left-color: #ea580c; }
.border-saastr          { border-left-color: #0891b2; }
.border-lenny           { border-left-color: #dc2626; }
.border-growth_unhinged { border-left-color: #4f46e5; }
.border-chartmogul      { border-left-color: #0d9488; }

/* Active filter pill uses source color */
.filter-pill.active.source-pma             { background: #7c3aed; }
.filter-pill.active.source-andrew_chen     { background: #059669; }
.filter-pill.active.source-intercom        { background: #2563eb; }
.filter-pill.active.source-hubspot         { background: #ea580c; }
.filter-pill.active.source-saastr          { background: #0891b2; }
.filter-pill.active.source-lenny           { background: #dc2626; }
.filter-pill.active.source-growth_unhinged { background: #4f46e5; }
.filter-pill.active.source-chartmogul      { background: #0d9488; }

/* ---- Empty state ---- */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #94a3b8;
}

.empty-state p:first-child {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* ---- Load more ---- */
#load-more-wrap {
    text-align: center;
    margin: 1.5rem 0;
}

.load-more {
    padding: 0.6rem 2rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
}

.load-more:hover {
    background: #e2e8f0;
}

/* ---- Footer ---- */
footer {
    text-align: center;
    padding: 2rem 1rem;
    color: #94a3b8;
    font-size: 0.85rem;
    border-top: 1px solid #f1f5f9;
    margin-top: 2rem;
}

/* ---- Responsive ---- */
@media (max-width: 640px) {
    main {
        padding: 1rem;
    }

    header {
        padding: 1.5rem 1rem 1rem;
    }

    header h1 {
        font-size: 1.4rem;
    }

    .article-meta {
        flex-wrap: wrap;
    }
}
