* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family:
    system-ui,
    -apple-system,
    sans-serif;
  line-height: 1.6;
  color: #1a1a1a;
  background: #fafafa;
}
header {
  background: #0f172a;
  color: #f1f5f9;
  padding: 1.5rem 1.5rem 1rem;
  text-align: center;
}
header h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
header h1 a {
  color: inherit;
  text-decoration: none;
}
header p {
  margin-top: 0.35rem;
  font-size: 0.95rem;
  color: #94a3b8;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}
nav {
  background: #1e293b;
  padding: 0.5rem 1.5rem;
  display: flex;
  justify-content: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}
nav a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.85rem;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  transition:
    background 0.15s,
    color 0.15s;
}
nav a:hover,
nav a.active {
  background: #334155;
  color: #f1f5f9;
}
main {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}
section {
  margin-bottom: 2.5rem;
}
section h2 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #0f172a;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}
.source {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  transition: box-shadow 0.15s;
}
.source:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.source h3 {
  font-size: 1rem;
  margin-bottom: 0.15rem;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.source h3 a {
  color: #2563eb;
  text-decoration: none;
}
.source h3 a:hover {
  text-decoration: underline;
}
.freshness {
  font-size: 0.7rem;
  font-weight: 500;
  color: #059669;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  white-space: nowrap;
}
.freshness.stale {
  color: #d97706;
  background: #fffbeb;
  border-color: #fde68a;
}
.source p {
  font-size: 0.9rem;
  color: #475569;
}
.tags {
  margin-top: 0.4rem;
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.tag {
  font-size: 0.7rem;
  background: #f1f5f9;
  color: #475569;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
}
.chart-container {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}
.chart-container h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.75rem;
}
.chart-container canvas {
  max-height: 350px;
}
.ranking-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.ranking-table th {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 2px solid #e2e8f0;
  color: #475569;
  font-weight: 600;
}
.ranking-table td {
  padding: 0.4rem 0.75rem;
  border-bottom: 1px solid #f1f5f9;
}
.ranking-table tr:hover td {
  background: #f8fafc;
}
.rank-bar {
  display: inline-block;
  height: 8px;
  border-radius: 4px;
  background: #3b82f6;
  vertical-align: middle;
  margin-left: 0.5rem;
}
footer {
  text-align: center;
  padding: 2rem 1.5rem;
  color: #94a3b8;
  font-size: 0.85rem;
}
footer a {
  color: #64748b;
}
