* { box-sizing: border-box; }
body {
    font-family: -apple-system, "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
    margin: 0;
    color: #222;
    background: #fafafa;
}
.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: #1f2937;
    color: #fff;
}
.nav-brand { color: #fff; font-weight: bold; text-decoration: none; }
.nav nav a { color: #d1d5db; text-decoration: none; margin-left: 1.25rem; }
.nav nav a:hover { color: #fff; }
.container { max-width: 900px; margin: 0 auto; padding: 1.5rem; }
.flash { padding: 0.75rem 1rem; border-radius: 4px; margin-bottom: 1rem; }
.flash-success { background: #dcfce7; color: #166534; }
.flash-error { background: #fee2e2; color: #991b1b; }
.article-table { width: 100%; border-collapse: collapse; }
.article-table th, .article-table td { text-align: left; padding: 0.5rem; border-bottom: 1px solid #e5e7eb; }
.badge { display: inline-block; background: #e0e7ff; color: #3730a3; padding: 0.15rem 0.5rem; border-radius: 999px; font-size: 0.85rem; }
.badge-muted { background: #e5e7eb; color: #6b7280; }
.meta { color: #6b7280; font-size: 0.9rem; }
.hashtags .tag { display: inline-block; background: #f3f4f6; padding: 0.1rem 0.5rem; border-radius: 4px; margin-right: 0.35rem; font-size: 0.85rem; }
.body-text { white-space: pre-wrap; line-height: 1.7; margin: 1.5rem 0; }
.recommendations ul { padding-left: 1.25rem; }
.recommendations .score { color: #9ca3af; font-size: 0.85rem; }
.cluster-group { margin-bottom: 2rem; }
.form { display: flex; flex-direction: column; gap: 1rem; max-width: 420px; }
.form label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.9rem; }
.form label.checkbox { flex-direction: row; align-items: center; gap: 0.5rem; }
.form input[type="text"], .form input[type="number"] { padding: 0.4rem; border: 1px solid #d1d5db; border-radius: 4px; }
.form button { align-self: flex-start; padding: 0.5rem 1.25rem; background: #1f2937; color: #fff; border: none; border-radius: 4px; cursor: pointer; }
.hint { color: #6b7280; font-size: 0.85rem; }
.empty { color: #6b7280; }

.chart-title { font-size: 1rem; color: #374151; margin: 1.5rem 0 0.5rem; }
.bar-chart, .line-chart { width: 100%; height: auto; }
.chart-bar { fill: #2a78d6; }
.chart-bar:hover { fill: #1c5cab; }
.chart-line { fill: none; stroke: #e34948; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-marker { fill: #e34948; stroke: #fafafa; stroke-width: 2; }
.chart-marker:hover { fill: #c53a39; }
.chart-gridline { stroke: #e5e7eb; stroke-width: 1; }
.chart-baseline { stroke: #9ca3af; stroke-width: 1; }
.chart-tick-label { fill: #6b7280; font-size: 11px; }
.chart-x-label { fill: #6b7280; font-size: 11px; }
.chart-value-label { fill: #374151; font-size: 11px; }
