/*
 * Setline blog — shared styles.
 *
 * Used by:
 *   /blog/                  (post list)
 *   /blog/[slug]/           (each post)
 *   /blog/_template/        (post template)
 *
 * Loaded as:  <link rel="stylesheet" href="/assets/blog.css">
 *
 * Single source of truth: edit here, every post picks up the change.
 */

:root {
  --bg: #0a0e1f;
  --bg-elev: #11162b;
  --text: #e5eefc;
  --muted: #8395b8;
  --accent: #4f8ef7;
  --border: #1e2a47;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", system-ui, Arial, sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

/* ============================================================
 * Header / footer (shared with /privacy and /terms — kept here
 * so the blog can evolve its chrome independently if needed)
 * ============================================================ */
.nav {
  padding: 24px 32px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 14px;
}
.nav-links a {
  margin-left: 24px;
  color: var(--muted);
  font-size: 14px;
}

footer {
  border-top: 1px solid var(--border);
  padding: 24px 32px;
  color: var(--muted);
  font-size: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
}
footer a { color: var(--muted); margin-right: 18px; }
footer a:hover { color: var(--text); }

/* ============================================================
 * Page container — same width as /privacy and /terms
 * ============================================================ */
.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 24px 96px;
}

/* ============================================================
 * Page-level headings (list page hero AND post hero)
 * ============================================================ */
.eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  font-weight: 700;
  margin: 0 0 12px;
}
h1 {
  font-size: 36px;
  line-height: 1.15;
  margin: 0 0 8px;
  color: var(--text);
}
.lede {
  color: var(--muted);
  font-size: 16px;
  margin: 0 0 48px;
  max-width: 640px;
}

/* ============================================================
 * Post list (used on /blog/ index page)
 * ============================================================ */
.post-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}
.post-card {
  display: block;
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
}
.post-card:hover { text-decoration: none; }
.post-card:hover .post-title { color: var(--accent); }
.post-date {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 6px;
}
.post-title {
  color: var(--text);
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 8px;
  line-height: 1.3;
  transition: color 0.15s ease;
}
.post-excerpt {
  color: #c7d3ea;
  font-size: 15px;
  margin: 0;
}

/* ============================================================
 * Empty state (on /blog/ when no posts exist yet)
 * ============================================================ */
.empty {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 28px 32px;
}
.empty p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}
.empty p + p { margin-top: 10px; }
.empty strong { color: var(--text); }

/* ============================================================
 * Post body — prose typography
 * Used inside <article class="post-body"> on individual posts
 * ============================================================ */
.post-meta {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 32px;
}

.post-body h2 {
  font-size: 24px;
  font-weight: 600;
  margin: 48px 0 14px;
  line-height: 1.3;
  color: var(--text);
}
.post-body h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 32px 0 10px;
  color: #c7d3ea;
}
.post-body p,
.post-body li {
  font-size: 16px;
  color: #d8e3f4;
}
.post-body p { margin: 0 0 18px; }
.post-body ul,
.post-body ol {
  padding-left: 22px;
  margin: 0 0 18px;
}
.post-body li { margin-bottom: 6px; }
.post-body strong { color: var(--text); font-weight: 600; }
.post-body em { color: var(--text); }

.post-body blockquote {
  margin: 24px 0;
  padding: 14px 22px;
  background: var(--bg-elev);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  color: var(--muted);
  font-style: italic;
  font-size: 15px;
}
.post-body blockquote p { margin: 0; }
.post-body blockquote p + p { margin-top: 10px; }

.post-body code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  background: var(--bg-elev);
  color: #c7d3ea;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.92em;
  border: 1px solid var(--border);
}
.post-body pre {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 18px;
  overflow-x: auto;
  margin: 0 0 22px;
  font-size: 14px;
  line-height: 1.55;
}
.post-body pre code {
  background: transparent;
  border: none;
  padding: 0;
  font-size: inherit;
  color: #d8e3f4;
}

.post-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

.post-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  display: block;
  margin: 24px auto;
}
.post-body figure { margin: 24px 0; }
.post-body figcaption {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  margin-top: 8px;
}

.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 22px;
  font-size: 14px;
}
.post-body th,
.post-body td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
.post-body th {
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.06em;
}
.post-body td { color: #d8e3f4; }

/* "Back to all posts" link at bottom of each post */
.post-back {
  display: inline-block;
  margin-top: 56px;
  font-size: 14px;
  color: var(--muted);
}
.post-back:hover { color: var(--accent); }
