/* News Brief - Dark Theme, Mobile-First */
:root {
    --bg: #0d1117;
    --surface: #161b22;
    --surface-hover: #1c2129;
    --border: #30363d;
    --text: #e6edf3;
    --text-muted: #8b949e;
    --accent: #58a6ff;
    --accent-green: #3fb950;
    --accent-orange: #d2991d;
    --accent-red: #f85149;
    --accent-purple: #a371f7;
    --section-ai: #a371f7;
    --section-tesla: #f85149;
    --section-tech: #58a6ff;
    --section-local: #3fb950;
    --section-sports: #d2991d;
    --radius: 8px;
    --max-width: 800px;
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Fira Mono', monospace;
}

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

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 20px 16px 40px;
}

/* Header */
.header {
    padding: 32px 0 24px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 32px;
}

.header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.header .subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 4px;
}

.header .date {
    color: var(--accent);
    font-size: 0.85rem;
    font-family: var(--font-mono);
    margin-top: 8px;
}

/* Section */
.section {
    margin-bottom: 36px;
}

.section-title {
    font-size: 1.15rem;
    font-weight: 700;
    padding-bottom: 8px;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title .icon {
    font-size: 1.3rem;
}

/* Section accent colors */
.section.ai .section-title { color: var(--section-ai); border-color: var(--section-ai); }
.section.tesla .section-title { color: var(--section-tesla); border-color: var(--section-tesla); }
.section.tech .section-title { color: var(--section-tech); border-color: var(--section-tech); }
.section.local .section-title { color: var(--section-local); border-color: var(--section-local); }
.section.sports .section-title { color: var(--section-sports); border-color: var(--section-sports); }

/* Article cards */
.article {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 12px;
    transition: background 0.15s ease;
}

.article:hover { background: var(--surface-hover); }

.article-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.4;
}

.article-title a {
    color: var(--text);
    text-decoration: none;
}

.article-title a:hover { color: var(--accent); }

.article-source {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.article-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Article with thumbnail */
.article.has-thumb {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.article.has-thumb .thumb {
    width: 100px;
    height: 70px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--surface-hover);
}

.article.has-thumb .article-body {
    flex: 1;
    min-width: 0;
}

/* Footer */
.footer {
    text-align: center;
    padding-top: 24px;
    margin-top: 40px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.8rem;
}

.footer em {
    color: var(--text-muted);
}

/* Mobile */
@media (max-width: 600px) {
    .header h1 { font-size: 1.5rem; }
    .section-title { font-size: 1rem; }
    .article.has-thumb { flex-direction: column; }
    .article.has-thumb .thumb { width: 100%; height: 140px; }
}

/* Loading / empty state */
.empty {
    text-align: center;
    padding: 32px 16px;
    color: var(--text-muted);
    font-style: italic;
}

/* Print */
@media print {
    body { background: #fff; color: #000; }
    .article { border: 1px solid #ccc; background: #fff; }
}
