:root {
  --bg: #0a0f14;
  --panel: #121a22;
  --border: #1f2a33;
  --text: #e8eef3;
  --muted: #8a9aa7;
  --accent: #6ee7d7;
  --accent-2: #a78bfa;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

.shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.hero { margin-bottom: 40px; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 12px;
  color: var(--accent);
  margin: 0 0 8px;
}

.hero h1 {
  font-size: clamp(32px, 5vw, 48px);
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}

.lede { color: var(--muted); max-width: 60ch; margin: 0; }

.workspace {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  gap: 24px;
}

@media (max-width: 820px) {
  .workspace { grid-template-columns: 1fr; }
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
}

.field { display: block; margin-bottom: 16px; }
.field > span {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}
.field select, .field input[type="text"], .field input[type="number"] {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 14px;
}

.toggle {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; color: var(--muted);
  margin: 16px 0;
}

.buttons { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

.primary, .secondary {
  border: 0;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0a0f14;
}
.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.primary:hover { filter: brightness(1.08); }
.secondary:hover { border-color: var(--accent); }

.output .placeholder {
  color: var(--muted);
  text-align: center;
  margin: 40px 0;
}

.meta { display: flex; gap: 8px; margin-bottom: 12px; }
.badge {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
}
.badge--kw { color: var(--accent); border-color: var(--accent); }

.hook {
  font-size: 26px;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}

.post-body p {
  margin: 0 0 8px;
  white-space: pre-wrap;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}

.aside p { margin: 8px 0; font-size: 14px; color: var(--muted); }
.aside strong { color: var(--text); }
.aside em { color: var(--text); font-style: normal; }

.tags code {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--accent-2);
  margin-right: 4px;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.toast--on { opacity: 1; transform: translateX(-50%) translateY(0); }

.image-slot { margin-top: 1rem; }
.image-slot .generated-image { width: 100%; max-width: 640px; border-radius: 12px; display: block; }
.image-slot .img-actions { margin-top: .5rem; font-size: .9rem; }
.image-slot .placeholder.error { color: #c0392b; }
