:root {
  --bg: #0d1117;
  --surface: #161b22;
  --border: #30363d;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --accent: #58a6ff;
  --green: #3fb950;
  --yellow: #d29922;
  --red: #f85149;
  --orange: #db6d28;
}

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

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 0;
  margin-bottom: 2rem;
}
.site-header nav {
  display: flex;
  align-items: baseline;
  gap: 1rem;
}
.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}
.logo:hover { text-decoration: none; color: var(--accent); }
.site-header .tagline {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Hero */
.hero {
  padding: 2rem 0 2.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}
.hero h1 {
  font-size: 2rem;
  margin-bottom: 0.25rem;
}
.hero .tagline {
  font-size: 1.1rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.hero .description {
  color: var(--text-muted);
  max-width: 600px;
}

/* Campaign Grid */
.campaigns h2 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}
.campaign-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.campaign-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  transition: border-color 0.15s;
  color: var(--text);
}
.campaign-card:hover {
  border-color: var(--accent);
  text-decoration: none;
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}
.campaign-id {
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.status-badge {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15em 0.6em;
  border-radius: 12px;
  background: var(--green);
  color: var(--bg);
}
.status-badge.status-blocked,
.status-blocked .status-badge {
  background: var(--yellow);
}
.status-badge.status-closed,
.status-closed .status-badge {
  background: var(--text-muted);
}
.campaign-card h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}
.latest-update {
  background: rgba(88, 166, 255, 0.08);
  border-left: 3px solid var(--accent);
  padding: 0.5rem 0.75rem;
  margin: 0.5rem 0;
  border-radius: 0 4px 4px 0;
}
.update-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
}
.latest-update p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}
.blocked-banner {
  font-size: 0.8rem;
  color: var(--yellow);
  font-weight: 600;
  margin-top: 0.25rem;
}
.campaign-card time {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* Single Post */
.campaign-post {
  max-width: 720px;
  margin: 0 auto;
}
.post-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.post-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}
.blocked-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--yellow);
  border: 1px solid var(--yellow);
  padding: 0.1em 0.5em;
  border-radius: 4px;
}
.post-header h1 {
  font-size: 1.75rem;
  margin-bottom: 0.25rem;
}
.post-header time {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.tags {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}
.tag {
  font-size: 0.75rem;
  background: rgba(88, 166, 255, 0.12);
  color: var(--accent);
  padding: 0.15em 0.6em;
  border-radius: 4px;
}
.post-content {
  line-height: 1.7;
}
.post-content h2 {
  font-size: 1.3rem;
  margin: 2rem 0 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
}
.post-content h3 {
  font-size: 1.1rem;
  margin: 1.5rem 0 0.5rem;
}
.post-content p { margin-bottom: 1rem; }
.post-content ul, .post-content ol {
  margin: 0 0 1rem 1.5rem;
}
.post-content blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  color: var(--text-muted);
  margin: 1rem 0;
}
.post-content code {
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 0.85em;
  background: rgba(110, 118, 129, 0.15);
  padding: 0.15em 0.35em;
  border-radius: 3px;
}
.post-content pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem;
  overflow-x: auto;
  margin: 1rem 0;
}
.post-content pre code {
  background: none;
  padding: 0;
}

/* Email Draft Block */
.email-draft {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin: 1.5rem 0;
  overflow: hidden;
}
.email-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: rgba(88, 166, 255, 0.06);
  border-bottom: 1px solid var(--border);
}
.email-icon { font-size: 1.1rem; }
.email-label {
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.email-status {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 0.1em 0.5em;
  border-radius: 4px;
}
.email-status.status-pending {
  background: var(--yellow);
  color: var(--bg);
}
.email-status.status-sent {
  background: var(--green);
  color: var(--bg);
}
.email-status.status-replied {
  background: var(--accent);
  color: var(--bg);
}
.email-meta {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border);
}
.email-meta td {
  padding: 0.35rem 1rem;
  border-bottom: 1px solid rgba(48, 54, 61, 0.5);
}
.meta-key {
  font-weight: 600;
  color: var(--text-muted);
  width: 80px;
  white-space: nowrap;
}
.email-body {
  padding: 1rem;
  font-size: 0.9rem;
  line-height: 1.6;
  white-space: pre-wrap;
}
.email-body p { margin-bottom: 0.75rem; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  margin-top: 3rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.site-footer a { color: var(--accent); }
.disclaimer {
  margin-top: 0.5rem;
  font-size: 0.75rem;
}
.post-footer {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  margin-top: 2rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.post-footer a { display: inline-block; margin-top: 0.5rem; }

@media (max-width: 600px) {
  .hero h1 { font-size: 1.5rem; }
  .campaign-grid { grid-template-columns: 1fr; }
}
