/* ==========================================================================
   VARIABILI GLOBALI (Unicità e Coerenza)
   ========================================================================== */
:root {
    /* Colori */
    --bg-main: #f5f5f5;
    --bg-card: #ffffff;
    --bg-th: #f9f9f9;
    --bg-badge: #eef2f7;
    
    --text-primary: #222222;   /* Titoli e testo forte */
    --text-secondary: #555555; /* Testo standard e summary */
    --text-muted: #777777;     /* Meta e footer */
    
    --primary-color: #1565c0;  /* Link e badge */
    --border-color: #eeeeee;
    
    /* Layout e Spazi */
    --radius-main: 10px;
    --radius-sm: 4px;
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

/* ==========================================================================
   GLOBAL
   ========================================================================== */
body {
    font-family: Arial, sans-serif;
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
    background: var(--bg-main);
    color: var(--text-secondary);
    line-height: 1.5; 
}

h1, h2 {
    color: var(--text-primary);
    margin-top: 0;
}

h1 {
    margin-bottom: 24px;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   ARTICLES
   ========================================================================== */
.article {
    background: var(--bg-card);
    padding: 24px; /* Uniformato a 24px come la sources-card */
    margin-bottom: 24px;
    border-radius: var(--radius-main);
    box-shadow: var(--shadow);
}

.summary {
    color: var(--text-secondary);
    margin-top: 12px;
}

.meta {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

/* ==========================================================================
   SOURCES / TABLES
   ========================================================================== */
.sources-card {
    background: var(--bg-card);
    padding: 24px;
    margin-bottom: 24px; 
    border-radius: var(--radius-main);
    box-shadow: var(--shadow);
}

.sources-card h2 {
    font-size: 20px;
    margin-bottom: 16px;
}

.table-responsive {
    overflow-x: auto;
}

.sources-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 15px;
}

.sources-table th, 
.sources-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

.sources-table th {
    background: var(--bg-th);
    color: var(--text-primary);
    font-weight: 600;
    border-bottom-width: 2px; 
}

.sources-table td {
    color: var(--text-secondary); 
}

.sources-table tr:last-child td {
    border-bottom: none;
}

/* Badge Keyword */
.keyword-badge {
    background: var(--bg-badge);
    color: var(--primary-color);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: bold;
    display: inline-block; 
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
    margin-top: 48px;
    color: var(--text-muted);
    font-size: 14px;
}
