/* Blog and post pages. Uses the site's existing design tokens from
   variables.css only, so posts stay visually part of the site rather than
   becoming a separate-looking microsite. Generated by tools/build_blog.py. */

.post {
  max-width: 720px;
  margin: 0 auto;
  padding: 72px 24px 96px;
  font-family: var(--font-family);
  color: var(--text-primary);
}

.post h1 {
  font-family: var(--font-display);
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
}

.post-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 22px;
}
.post-eyebrow a { color: var(--text-tertiary); text-decoration: none; }
.post-eyebrow a:hover { color: var(--accent-color); }

.post-byline {
  font-size: 14px;
  color: var(--text-secondary);
  padding-bottom: 22px;
  border-bottom: 1px solid var(--rule);
}

.post-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 0; }
.post-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  background: var(--surface-paper);
  border-radius: 4px;
  padding: 3px 8px;
}

/* ── article body ────────────────────────────────────────────────────────── */

.post-body { margin-top: 34px; font-size: 17px; line-height: 1.72; }
.post-body p { margin: 0 0 22px; }

.post-body h2 {
  font-family: var(--font-display);
  font-size: 27px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 48px 0 16px;
}
.post-body h3 { font-size: 19px; font-weight: 650; margin: 34px 0 12px; }

.post-body a { color: var(--accent-color); text-decoration: underline; text-underline-offset: 2px; }
.post-body a:hover { color: var(--accent-dark); }
.post-body strong { font-weight: 650; }

.post-body ul, .post-body ol { margin: 0 0 22px; padding-left: 24px; }
.post-body li { margin-bottom: 10px; }

.post-body blockquote {
  margin: 30px 0;
  padding: 4px 0 4px 22px;
  border-left: 3px solid var(--accent-color);
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.5;
  color: var(--text-primary);
}
.post-body blockquote p { margin: 0; }

.post-body code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--surface-paper);
  border-radius: 3px;
  padding: 2px 5px;
}

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

/* Wide tables scroll inside their own container. The page body must never
   scroll horizontally, least of all on a phone. */
.post-table { overflow-x: auto; margin: 0 0 26px; }
.post-body table { width: 100%; border-collapse: collapse; font-size: 15px; }
.post-body thead th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--rule);
  padding: 0 14px 9px 0;
  white-space: nowrap;
}
.post-body tbody td {
  border-bottom: 1px solid var(--rule-soft);
  padding: 11px 14px 11px 0;
  vertical-align: top;
}

/* ── index ───────────────────────────────────────────────────────────────── */

.blog-lede {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 620px;
  margin: 0 0 46px;
}

.post-list { list-style: none; margin: 0; padding: 0; }
.post-card { border-top: 1px solid var(--rule); }
.post-card:last-child { border-bottom: 1px solid var(--rule); }
.post-card a { display: block; padding: 26px 0; text-decoration: none; color: inherit; }
.post-card a:hover h2 { color: var(--accent-color); }
.post-card time {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-tertiary);
  letter-spacing: 0.05em;
}
.post-card h2 {
  font-family: var(--font-display);
  font-size: 23px;
  line-height: 1.3;
  margin: 8px 0 8px;
  transition: color .15s ease;
}
.post-card p { margin: 0; color: var(--text-secondary); font-size: 15px; line-height: 1.6; }

@media (max-width: 620px) {
  .post { padding: 48px 20px 72px; }
  .post-body { font-size: 16px; }
  .post-body h2 { font-size: 23px; margin: 38px 0 14px; }
}

/* Language marker on the index, so a Swedish post is not mistaken for a
   duplicate of the English one. */
.post-lang {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--accent-color);
  border: 1px solid var(--accent-color);
  border-radius: 3px;
  padding: 1px 5px;
  margin-left: 8px;
  vertical-align: 1px;
}
