* { box-sizing: border-box; }
body {
  font-family: -apple-system, Segoe UI, Roboto, sans-serif;
  margin: 0; background: #f5f6f8; color: #1a1a1a;
}
header {
  background: #0f172a; color: #fff; padding: 16px 24px;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap;
}
header h1 { margin: 0; font-size: 20px; }
header .meta { font-size: 13px; opacity: .9; }
header button {
  background: #2563eb; color: #fff; border: 0; padding: 6px 14px;
  margin-left: 12px; border-radius: 4px; cursor: pointer; font-size: 13px;
}
header button:hover { background: #1d4ed8; }

.tabs {
  display: flex; gap: 2px; padding: 0 24px; background: #fff;
  border-bottom: 1px solid #e5e7eb;
}
.tabs .tab {
  background: transparent; border: 0; padding: 12px 18px; cursor: pointer;
  font-size: 14px; font-weight: 500; color: #64748b;
  border-bottom: 3px solid transparent; transition: color .15s, border-color .15s;
}
.tabs .tab:hover { color: #0f172a; }
.tabs .tab.active { color: #2563eb; border-bottom-color: #2563eb; }
.tabs .tab-count {
  display: inline-block; margin-left: 6px; padding: 1px 8px;
  font-size: 11px; background: #e2e8f0; color: #475569; border-radius: 10px;
  font-weight: 600;
}
.tabs .tab.active .tab-count { background: #dbeafe; color: #1d4ed8; }

.filters {
  background: #fff; padding: 14px 24px; border-bottom: 1px solid #e5e7eb;
  display: flex; gap: 24px; flex-wrap: wrap; align-items: center;
}
.filters .group { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.filters label { font-weight: 600; }
.chip {
  background: #f1f5f9; padding: 4px 10px; border-radius: 12px; font-weight: 400;
  cursor: pointer;
}
.chip input { margin-right: 4px; }
.filters select, .filters input[type=text] {
  padding: 5px 8px; border: 1px solid #cbd5e1; border-radius: 4px; font-size: 13px;
}

.stats { padding: 8px 24px; background: #fafafa; font-size: 12px; display: flex; gap: 12px; flex-wrap: wrap; }
.stat { padding: 2px 8px; border-radius: 3px; background: #e5e7eb; }
.stat.ok { background: #d1fae5; color: #065f46; }
.stat.fail { background: #fee2e2; color: #991b1b; }

table { width: 100%; border-collapse: collapse; background: #fff; }
thead th {
  text-align: left; padding: 10px 16px; background: #f9fafb;
  border-bottom: 2px solid #e5e7eb; font-size: 12px; text-transform: uppercase;
  letter-spacing: .5px; color: #4b5563;
}
tbody td { padding: 12px 16px; border-bottom: 1px solid #f1f5f9; font-size: 14px; vertical-align: top; }
tbody tr:hover { background: #f8fafc; }
.rank { color: #94a3b8; font-variant-numeric: tabular-nums; width: 40px; }
.score { color: #6b7280; font-variant-numeric: tabular-nums; text-align: right; }
a { color: #1d4ed8; text-decoration: none; }
a:hover { text-decoration: underline; }

.badge {
  display: inline-block; padding: 2px 6px; margin-right: 4px;
  border-radius: 3px; font-size: 11px; background: #e2e8f0; color: #334155;
}
.badge.src-google_trends { background: #fef3c7; color: #92400e; }
.badge.src-reddit        { background: #ffedd5; color: #9a3412; }
.badge.src-youtube       { background: #fee2e2; color: #991b1b; }
.badge.src-news_rss      { background: #dbeafe; color: #1e40af; }
.badge.src-twitter_x     { background: #e0e7ff; color: #3730a3; }
.badge.region            { background: #f1f5f9; color: #475569; }

footer { padding: 14px 24px; color: #6b7280; font-size: 12px; }
