/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  color: #1a1a2e;
  background: #fafafa;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Nav */
.site-nav {
  background: #1a1a2e;
  color: #fff;
  padding: 0.75rem 0;
}

.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.nav-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.9375rem;
}

.nav-links a:hover {
  color: #fff;
}

/* Main */
.site-main {
  flex: 1;
  padding: 2rem 0;
}

/* Footer */
.site-footer {
  background: #1a1a2e;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  padding: 1rem 0;
  font-size: 0.875rem;
}

/* Typography */
h1, h2, h3 {
  line-height: 1.3;
}

h1 { font-size: 2rem; margin-bottom: 0.5rem; }
h2 { font-size: 1.5rem; margin-bottom: 0.5rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.375rem; }

p { margin-bottom: 1rem; }

a { color: #2563eb; }
a:hover { text-decoration: underline; }

/* Card grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
  display: block;
}

.card:hover {
  border-color: #2563eb;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}

.card h3 {
  font-size: 1.125rem;
  margin-bottom: 0.375rem;
}

.card p {
  font-size: 0.9375rem;
  color: #6b7280;
  margin-bottom: 0;
}

/* Badge */
.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
  margin-right: 0.375rem;
}

.badge-sponsored {
  background: #fef3c7;
  color: #92400e;
}

.badge-featured {
  background: #dbeafe;
  color: #1e40af;
}

/* Score bar */
.score-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.score-total {
  font-weight: 700;
  font-size: 1.125rem;
  color: #2563eb;
}

.score-detail {
  font-size: 0.8125rem;
  color: #6b7280;
}

/* Tags */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 0.75rem;
}

.tag {
  background: #f3f4f6;
  color: #374151;
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
}

/* Table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #e5e7eb;
}

.data-table th {
  font-weight: 600;
  color: #374151;
  font-size: 0.875rem;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #6b7280;
}

.empty-state h2 {
  color: #374151;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
}

.pagination a,
.pagination span {
  padding: 0.375rem 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  font-size: 0.875rem;
  text-decoration: none;
  color: #374151;
}

.pagination .current {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

/* Filters */
.filters {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.filters label {
  font-size: 0.875rem;
  color: #374151;
}

.filters select,
.filters input {
  padding: 0.375rem 0.5rem;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 0.875rem;
}

.filters button {
  padding: 0.375rem 1rem;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 0.875rem;
  cursor: pointer;
}

.filters button:hover {
  background: #1d4ed8;
}

/* Rich text */
.rich-text h1 { font-size: 2rem; margin: 1.5rem 0 0.5rem; }
.rich-text h2 { font-size: 1.5rem; margin: 1.25rem 0 0.5rem; }
.rich-text h3 { font-size: 1.25rem; margin: 1rem 0 0.375rem; }
.rich-text ul, .rich-text ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.rich-text li { margin-bottom: 0.25rem; }
