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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f6f8;
    color: #1a1a2e;
    line-height: 1.5;
}

header {
    background: #1a1a2e;
    color: #fff;
    padding: 24px 0;
    border-bottom: 3px solid #c00000;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

header h1 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 8px;
}

.header-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.header-meta span {
    font-size: 13px;
    padding: 3px 10px;
    border-radius: 3px;
    font-weight: 500;
}

#edition-badge { background: #2f5496; }
#brent-badge { background: #c00000; }
#date-badge { background: #333; }

main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}

section {
    background: #fff;
    border-radius: 6px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

h2 {
    font-size: 16px;
    font-weight: 600;
    color: #2f5496;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e8ecf1;
}

/* Commentary */
#commentary-list {
    list-style: none;
    padding: 0;
}

#commentary-list li {
    padding: 8px 0 8px 16px;
    border-left: 3px solid #2f5496;
    margin-bottom: 10px;
    font-size: 14px;
    color: #333;
    line-height: 1.6;
}

/* Tracker Table */
.table-scroll {
    overflow-x: auto;
    margin-bottom: 12px;
}

#tracker-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 900px;
}

#tracker-table th {
    background: #2f5496;
    color: #fff;
    padding: 10px 8px;
    text-align: center;
    font-weight: 600;
    font-size: 12px;
    position: sticky;
    top: 0;
    white-space: nowrap;
}

#tracker-table th:first-child,
#tracker-table th:nth-child(2) {
    text-align: left;
}

#tracker-table td {
    padding: 8px;
    border: 1px solid #e0e0e0;
    vertical-align: top;
    font-size: 12px;
}

#tracker-table td:first-child {
    font-weight: 600;
    white-space: nowrap;
    min-width: 180px;
    background: #fafbfc;
}

#tracker-table td:nth-child(2) {
    color: #888;
    font-size: 11px;
    min-width: 140px;
}

#tracker-table td:not(:first-child):not(:nth-child(2)) {
    text-align: center;
    min-width: 130px;
}

#tracker-table tr.section-header td {
    background: #d6e4f0;
    font-weight: 600;
    color: #2f5496;
    font-size: 12px;
    padding: 6px 8px;
    border: none;
}

#tracker-table a {
    color: #0563c1;
    text-decoration: none;
}

#tracker-table a:hover {
    text-decoration: underline;
}

#tracker-notes {
    font-size: 11px;
    color: #888;
    line-height: 1.6;
}

#tracker-notes p {
    margin-bottom: 4px;
}

/* News Feed */
.news-controls {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-group label {
    font-size: 13px;
    font-weight: 500;
    color: #555;
}

.filter-group select {
    padding: 5px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
    background: #fff;
}

#news-count {
    font-size: 12px;
    color: #888;
    margin-left: auto;
}

#news-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

#news-table thead th {
    background: #2f5496;
    color: #fff;
    padding: 8px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    position: sticky;
    top: 0;
}

#news-table td {
    padding: 6px 8px;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}

#news-table tr:hover {
    background: #f5f8fc;
}

#news-table td:nth-child(1) { white-space: nowrap; width: 80px; }
#news-table td:nth-child(2) { width: 90px; font-weight: 500; }
#news-table td:nth-child(3) { width: 100px; }
#news-table td:nth-child(4) { min-width: 250px; }
#news-table td:nth-child(5) { min-width: 200px; color: #555; }
#news-table td:nth-child(6) { width: 100px; }

#news-table a {
    color: #0563c1;
    text-decoration: none;
}

#news-table a:hover {
    text-decoration: underline;
}

.category-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 500;
}

.cat-ev-interest { background: #e2efda; color: #2d6a2e; }
.cat-fuel-price { background: #fce4d6; color: #a04000; }
.cat-policy { background: #d6e4f0; color: #2f5496; }
.cat-ev-sales { background: #e8daef; color: #6c3483; }
.cat-macro { background: #f2f2f2; color: #555; }
.cat-platform { background: #fff2cc; color: #7d6608; }

footer {
    text-align: center;
    padding: 20px;
    font-size: 12px;
    color: #888;
    border-top: 1px solid #e0e0e0;
}

@media (max-width: 768px) {
    main { padding: 12px; }
    section { padding: 16px; }
    header h1 { font-size: 18px; }
    .news-controls { flex-direction: column; align-items: flex-start; }
}
