:root {
  --primary: #0d1117;
  --primary-light: #161b22;
  --accent: #06B6D4;
  --accent-hover: #0891b2;
  --accent-glow: rgba(6,182,212,0.12);
  --bg: #010409;
  --bg-surface: #0d1117;
  --bg-card: #161b22;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --text-dim: #484f58;
  --border: #21262d;
  --border-light: #30363d;
  --max-width: 920px;
  --radius: 8px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* Header */
header {
  background: var(--bg-surface);
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-brand { display: flex; align-items: center; gap: 12px; }
.header-logo {
  width: 38px; height: 38px;
  background: var(--accent);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 900; color: #010409;
  letter-spacing: -1px;
}
header h1 { color: var(--text); font-size: 20px; letter-spacing: 0.3px; font-weight: 700; }
header h1 a { color: var(--text); text-decoration: none; }
header .tagline { color: var(--text-dim); font-size: 12px; margin-top: 1px; }
.subscribe-btn {
  background: var(--accent);
  color: #010409;
  padding: 8px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  transition: background 0.2s;
}
.subscribe-btn:hover { background: var(--accent-hover); }

/* Nav — category filter bar */
nav {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
nav .container {
  display: flex;
  gap: 0;
  align-items: stretch;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
nav .container::-webkit-scrollbar { display: none; }
nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  padding: 10px 14px;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
nav a:hover { color: var(--text); }
nav a.active { color: var(--accent); border-bottom-color: var(--accent); }
nav .channel-filter { opacity: 0.7; }
nav .channel-filter:hover { opacity: 1; }
nav .channel-filter.active { opacity: 1; color: var(--accent); border-bottom-color: var(--accent); }

/* Day section wrapper for filtering */
.day-section { transition: opacity 0.2s; }
.day-section.hidden { display: none; }

/* OG image in post card */
.post-og-image {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 12px;
  background: var(--bg-surface);
}
.post-card-featured .post-og-image { height: 200px; }

/* Main */
main { padding: 32px 0 60px; }

/* Section labels */
.section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

/* Day header with category tag */
.day-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 36px 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.day-header:first-child { margin-top: 0; }
.day-header .theme-badge {
  padding: 5px 14px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}
.day-header .date { font-size: 13px; color: var(--text-muted); }
.day-header .post-count {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-dim);
}

/* Featured card — top story */
.post-card-featured {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 14px;
  border: 1px solid var(--border-light);
  position: relative;
  overflow: hidden;
}
.post-card-featured::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: var(--accent);
}

/* Standard post card */
.post-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  transition: border-color 0.15s, transform 0.15s;
}
.post-card:hover {
  border-color: var(--border-light);
  transform: translateY(-1px);
}
.post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.post-meta .source-tag {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 4px;
}
.post-meta .source-wire {
  color: var(--accent);
  background: var(--accent-glow);
}
.post-meta .source-breaking {
  color: #f39c12;
  background: rgba(243,156,18,0.12);
}
.post-meta .source-curated {
  color: #27ae60;
  background: rgba(39,174,96,0.12);
}
.post-meta .time { color: var(--text-dim); }
.post-meta .score {
  margin-left: auto;
  background: var(--accent-glow);
  color: var(--accent);
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}
.post-text {
  font-size: 15px;
  line-height: 1.75;
  white-space: pre-wrap;
  word-wrap: break-word;
  color: var(--text);
}
.post-card-featured .post-text { font-size: 16px; line-height: 1.8; }
.post-text a { color: var(--accent); text-decoration: none; }
.post-text a:hover { text-decoration: underline; }
.post-engagement {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-dim);
  display: flex;
  gap: 16px;
  align-items: center;
}
.post-engagement a { color: var(--accent); text-decoration: none; font-weight: 500; }
.post-engagement a:hover { text-decoration: underline; }

/* Two-column grid for non-featured posts */
.posts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Stats bar (weekly digest) */
.stats-bar {
  display: flex;
  gap: 24px;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg-card) 0%, #0d2137 100%);
  padding: 24px;
  border-radius: var(--radius);
  margin-bottom: 24px;
  border: 1px solid var(--border);
}
.stat { text-align: center; color: white; }
.stat .number { font-size: 28px; font-weight: 800; color: var(--accent); }
.stat .label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.8px; margin-top: 2px; }

/* Trending sidebar-style list */
.trending-list {
  list-style: none;
  counter-reset: trending;
}
.trending-list li {
  counter-increment: trending;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.trending-list li::before {
  content: counter(trending, decimal-leading-zero);
  font-size: 20px;
  font-weight: 800;
  color: var(--accent);
  min-width: 28px;
  line-height: 1.3;
}
.trending-list a { color: var(--text); text-decoration: none; font-weight: 500; font-size: 14px; line-height: 1.5; }
.trending-list a:hover { color: var(--accent); }
.trending-list .meta { font-size: 11px; color: var(--text-dim); display: block; margin-top: 3px; }

/* Archive list */
.archive-list { list-style: none; }
.archive-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}
.archive-list a { color: var(--text); text-decoration: none; font-weight: 500; flex: 1; }
.archive-list a:hover { color: var(--accent); }
.archive-list .meta { font-size: 12px; color: var(--text-dim); white-space: nowrap; }

/* About page */
.about-section { margin-bottom: 36px; }
.about-section h2 { font-size: 20px; margin-bottom: 14px; color: white; }
.about-section p { margin-bottom: 10px; color: var(--text-muted); }
.about-section strong { color: var(--text); }

/* Schedule grid */
.schedule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.schedule-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
}
.schedule-item .day { font-weight: 700; color: white; font-size: 14px; }
.schedule-item .topic { color: var(--text-muted); font-size: 13px; margin-top: 2px; }

/* Footer */
footer {
  text-align: center;
  padding: 28px 0;
  color: var(--text-dim);
  font-size: 12px;
  border-top: 1px solid var(--border);
  margin-top: 48px;
}
footer a { color: var(--text-muted); text-decoration: none; }
footer a:hover { color: var(--accent); }
footer .links { margin-bottom: 8px; display: flex; gap: 16px; justify-content: center; }

/* View all link */
.view-all {
  display: block;
  text-align: center;
  padding: 12px;
  color: var(--accent);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: 4px;
  transition: background 0.15s;
}
.view-all:hover { background: var(--bg-card); }

/* Responsive */
@media (max-width: 700px) {
  .header-inner { flex-direction: column; gap: 12px; text-align: center; }
  .header-brand { justify-content: center; }
  .posts-grid { grid-template-columns: 1fr; }
  .stats-bar { flex-direction: column; gap: 12px; }
  .post-card, .post-card-featured { padding: 16px; }
  .post-og-image { height: 120px; }
  nav .container { gap: 0; }
  .schedule-grid { grid-template-columns: 1fr; }
}
