/* All black, white text, lime-green AI. */
:root {
  --bg: #000000;
  --surface: #000000;
  --surface-2: #101010;
  --border: #262626;
  --text: #ffffff;
  --muted: #9a9a9a;
  --accent: #ffffff;           /* links/buttons in white */
  --ai: #a3e635;               /* lime green — used only for "AI" */
  --user-bubble: #171717;
  --assistant-bubble: #000000;
  --assistant-border: #2a2a2a;
  --commentary: #0d0d0d;
  --commentary-border: #a3e635;
  --radius: 14px;
  --maxw: 760px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* The lime-green AI mark. */
.ai { color: var(--ai); }
.wordmark { font-weight: 700; }

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

header.site {
  border-bottom: 1px solid var(--border);
  padding: 28px 0 22px;
  margin-bottom: 8px;
}
header.site h1 { margin: 0; font-size: clamp(1.9rem, 4.5vw, 2.75rem); letter-spacing: -0.02em; }
header.site h1 a { color: var(--text); }
header.site p.tagline { margin: 6px 0 0; color: var(--muted); font-size: 0.98rem; }
header.site nav { margin-top: 14px; display: flex; gap: 18px; font-size: 0.9rem; }
header.site nav a { color: var(--muted); }

/* Home page hero: oversized, left-aligned masthead, grounded by a divider. */
header.site.hero {
  border-bottom: 1px solid var(--border);
  padding: clamp(56px, 9vh, 120px) 0 clamp(36px, 6vh, 64px);
  margin-bottom: 0;
}
header.site.hero .container { max-width: 1040px; }
header.site.hero h1 {
  font-size: clamp(3.25rem, 13vw, 9.5rem);
  line-height: 0.92;
  letter-spacing: -0.035em;
  font-weight: 700;
}
header.site.hero p.tagline {
  font-size: clamp(1.3rem, 3.4vw, 2.5rem);
  line-height: 1.2;
  margin-top: clamp(18px, 2.5vw, 34px);
}

/* Post list */
.post-list { list-style: none; padding: 0; margin: 28px 0; }
.post-card {
  display: block;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  transition: border-color .15s ease, transform .15s ease;
}
.post-card:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-1px); }
.post-card h2 { margin: 0 0 6px; font-size: 1.18rem; color: var(--text); letter-spacing: -0.01em; }
.post-card .meta { color: var(--muted); font-size: 0.85rem; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.post-card p.excerpt { margin: 10px 0 0; color: var(--muted); font-size: 0.95rem; }

.badge {
  display: inline-block;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
}
.tag { font-size: 0.75rem; color: var(--accent); }

/* Single post */
article.post { margin: 30px 0 60px; }
article.post .post-header h1 { font-size: 1.9rem; margin: 0 0 8px; letter-spacing: -0.02em; }
article.post .post-header .meta { color: var(--muted); font-size: 0.88rem; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.commentary-block {
  margin: 24px 0;
  color: var(--text);
  font-size: 1.02rem;
}
.commentary-block p { margin: 0 0 12px; }

.transcript { margin: 30px 0; }

.bubble-row { display: flex; margin: 14px 0; }
.bubble-row.user { justify-content: flex-end; }
.bubble-row.assistant { justify-content: flex-start; }

.bubble {
  max-width: 82%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 0.98rem;
  white-space: pre-wrap;
  word-wrap: break-word;
  border: 1px solid var(--border);
}
.bubble .who {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 5px;
}
.bubble-row.user .bubble { background: var(--user-bubble); border-bottom-right-radius: 5px; }
.bubble-row.assistant .bubble { background: var(--assistant-bubble); border-color: var(--assistant-border); border-bottom-left-radius: 5px; }

.inline-note {
  margin: 16px auto;
  max-width: 92%;
  background: var(--commentary);
  border: 1px solid var(--commentary-border);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.92rem;
  color: var(--text);
}
.inline-note .who {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 4px;
}

.source-link { margin-top: 30px; font-size: 0.85rem; color: var(--muted); }

footer.site { border-top: 1px solid var(--border); padding: 24px 0; margin-top: 40px; color: var(--muted); font-size: 0.85rem; text-align: center; }

.empty { color: var(--muted); padding: 40px 0; text-align: center; }
.back-link { display: inline-block; margin: 24px 0 0; font-size: 0.9rem; }

/* Editor page */
.editor label { display: block; font-weight: 600; margin: 18px 0 6px; font-size: 0.9rem; }
.editor input, .editor textarea, .editor select {
  width: 100%; padding: 10px 12px; background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 10px; font-family: var(--font); font-size: 0.95rem;
}
.editor textarea { min-height: 90px; resize: vertical; }
.msg-editor { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin: 12px 0; }
.msg-editor .row { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.msg-editor select { width: auto; }
.btn {
  display: inline-block; padding: 10px 16px; border-radius: 10px; border: 1px solid var(--accent);
  background: var(--accent); color: #000; font-size: 0.92rem; cursor: pointer; font-family: var(--font);
}
.btn.secondary { background: transparent; color: var(--accent); }
.btn.ghost { background: transparent; color: var(--muted); border-color: var(--border); }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0; }
pre.output {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px; overflow-x: auto; font-size: 0.82rem; white-space: pre-wrap;
}
.hint { color: var(--muted); font-size: 0.85rem; margin: 6px 0 0; }
