:root {
    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    color: #1f2937;
    background: #f5f7fa;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
}

.site-header {
    background: #1e1b4b;
    color: white;
}

.header-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1.5rem;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.site-header h1 {
    margin: 0;
    font-size: 2rem;
}

.site-header p {
    margin: 0.4rem 0 0;
    color: #c7d2fe;
}

#refresh-button {
    border: 0;
    border-radius: 8px;

    padding: 0.65rem 1rem;

    background: white;
    color: #1e1b4b;

    font-weight: 600;
    cursor: pointer;
}

#refresh-button:hover {
    opacity: 0.9;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.controls {
    margin-bottom: 2rem;
    padding: 1rem;

    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}

.controls label {
    display: block;
    margin-bottom: 0.4rem;

    font-size: 0.85rem;
    font-weight: 600;
}

.controls select {
    padding: 0.55rem 0.75rem;

    border: 1px solid #d1d5db;
    border-radius: 7px;

    background: white;
}

.section-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;

    margin-bottom: 1rem;
}

.section-heading h2 {
    margin: 0;
}

#article-count {
    color: #6b7280;
    font-size: 0.9rem;
}

.articles {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.article-card {
    background: white;

    border: 1px solid #e5e7eb;
    border-radius: 10px;

    padding: 1.25rem;

    transition:
        box-shadow 0.15s ease,
        transform 0.15s ease;
}

.article-card:hover {
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.08);

    transform: translateY(-1px);
}

.article-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.score {
    display: inline-flex;

    width: 42px;
    height: 42px;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #4338ca;
    color: white;

    font-size: 0.9rem;
    font-weight: 700;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;

    color: #6b7280;
    font-size: 0.85rem;
}

.category {
    font-weight: 600;
    color: #374151;
}

.article-card h3 {
    margin: 0.9rem 0 0.6rem;

    font-size: 1.2rem;
    line-height: 1.4;
}

.article-card h3 a {
    color: #111827;
    text-decoration: none;
}

.article-card h3 a:hover {
    text-decoration: underline;
}

.summary {
    margin: 0;

    color: #4b5563;
    line-height: 1.6;
}

.keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;

    margin-top: 1rem;
}

.keyword {
    padding: 0.25rem 0.6rem;

    border-radius: 999px;

    background: #eef2ff;
    color: #3730a3;

    font-size: 0.78rem;
    font-weight: 600;
}

.doi {
    margin: 0.75rem 0 0;

    font-size: 0.82rem;
    color: #6b7280;
}

.doi a {
    color: #4338ca;
    text-decoration: none;
}

.doi a:hover {
    text-decoration: underline;
}

.status {
    padding: 2rem;
    text-align: center;

    color: #6b7280;
}

.error {
    color: #b91c1c;
}

.empty {
    padding: 3rem;
    text-align: center;

    background: white;
    border-radius: 10px;

    color: #6b7280;
}

.hidden {
    display: none;
}

footer {
    max-width: 1000px;
    margin: 0 auto;

    padding: 2rem 1.5rem;

    color: #9ca3af;
    font-size: 0.85rem;
}

@media (max-width: 600px) {
    .header-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .article-header {
        align-items: flex-start;
    }

    .article-meta {
        flex-direction: column;
        gap: 0.2rem;
    }
}

.feed-section-heading {
    margin: 2rem 0 1rem;

    font-size: 1.4rem;
}

.feed-section-heading:first-child {
    margin-top: 0;
}
