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

:root {
  --bg: #fafafa;
  --text: #1a1a1a;
  --text-muted: #666;
  --border: #e0e0e0;
  --accent: #333;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

header h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

header .description {
  color: var(--text-muted);
  font-size: 0.9rem;
}

header nav {
  margin-top: 1rem;
}

header nav a {
  color: var(--text-muted);
  text-decoration: none;
  margin-right: 1rem;
  font-size: 0.9rem;
}

header nav a:hover,
header nav a.active {
  color: var(--text);
}

.stats {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.separator {
  margin: 0 0.25rem;
  color: var(--border);
}

.filters {
  margin-bottom: 1.5rem;
}

.filter-btn {
  background: none;
  border: 1px solid var(--border);
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
  cursor: pointer;
  border-radius: 3px;
  margin-right: 0.25rem;
  color: var(--text-muted);
}

.filter-btn:hover {
  border-color: var(--text-muted);
}

.filter-btn.active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.item {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
}

.item a {
  text-decoration: none;
  color: inherit;
}

.item h2 {
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.item a:hover h2 {
  color: var(--accent);
}

.item .meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.item .source-type {
  text-transform: uppercase;
  font-weight: 500;
}

.item .category {
  background: var(--border);
  padding: 0.1rem 0.4rem;
  border-radius: 2px;
}

footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
}

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

footer a:hover {
  color: var(--text);
}

.error, .empty {
  text-align: center;
  color: var(--text-muted);
  padding: 2rem;
}

.prose h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.prose h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.prose p {
  margin-bottom: 1rem;
}

.prose ul, .prose ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.prose li {
  margin-bottom: 0.25rem;
}

.prose a {
  color: var(--text);
  text-decoration: underline;
}

.prose a:hover {
  color: var(--text-muted);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.prose th, .prose td {
  border: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  text-align: left;
}

.prose th {
  background: var(--bg);
  font-weight: 600;
}

.prose pre {
  background: #f5f5f5;
  padding: 1rem;
  border-radius: 4px;
  overflow-x: auto;
  font-size: 0.8rem;
  margin-bottom: 1rem;
}

.prose code {
  font-family: "SF Mono", Consolas, monospace;
}
