/* Blog - extends /styles.css tokens and the shared article furniture in
   /illness/illness.css (.ill-layout, .ill-article, .ill-crumbs, .eeat*, .ill-cta),
   the same way the location pages do. Only blog-specific rules live here. */

.blog-page { background: var(--paper); }
.blog-main { padding: 28px 0 80px; }

/* ---------- hub ---------- */

.blog-hub-head { max-width: 62ch; margin-bottom: 34px; }
.blog-hub-head h1 {
  font-size: clamp(32px, 5vw, 48px);
  letter-spacing: -0.035em;
}
.blog-hub-lead {
  font-size: clamp(17px, 2vw, 20px);
  color: var(--ink-2);
  margin-top: 14px;
  font-weight: 450;
}
.blog-hub-count { font-size: 14px; color: var(--ink-3); margin-top: 14px; }

/* Tag rail - one row of filters, no JS: each is a real anchor into a tag section. */
.blog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 30px;
}
.blog-tag {
  font-size: 13px;
  font-weight: 700;
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink-2);
}
.blog-tag:hover { border-color: var(--green); color: var(--green-deep); }

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.blog-card-img {
  width: 100%;
  height: 168px;
  object-fit: cover;
  display: block;
  background: var(--paper-2);
}
.blog-card-body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.blog-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 12px;
}
.blog-card-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--ink-3); }
.blog-card h2 {
  font-size: 21px;
  line-height: 1.25;
  letter-spacing: -0.025em;
  margin: 0 0 10px;
}
.blog-card h2 a { color: var(--ink); }
.blog-card h2 a:hover { color: var(--green-deep); }
.blog-card p { color: var(--ink-2); font-size: 15.5px; line-height: 1.55; margin: 0 0 16px; }
.blog-card-link {
  margin-top: auto;
  font-weight: 700;
  font-size: 14.5px;
  color: var(--green-deep);
}
.blog-card-link:hover { text-decoration: underline; }

/* The first post gets the full width of the grid - a section front needs a lead story,
   otherwise every article reads as equally (un)important. */
.blog-grid .blog-card.lead { grid-column: 1 / -1; }
@media (min-width: 860px) {
  .blog-grid .blog-card.lead { flex-direction: row; }
  .blog-grid .blog-card.lead .blog-card-img { width: 44%; height: auto; min-height: 260px; }
  .blog-grid .blog-card.lead .blog-card-body { padding: 32px 34px; justify-content: center; }
  .blog-grid .blog-card.lead h2 { font-size: 30px; letter-spacing: -0.03em; }
  .blog-grid .blog-card.lead p { font-size: 17px; }
}

.blog-tag-section { margin-top: 46px; scroll-margin-top: 96px; }
.blog-tag-section h2 {
  font-size: 22px;
  letter-spacing: -0.025em;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.blog-tag-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.blog-tag-list li { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.blog-tag-list a { font-weight: 700; color: var(--ink); }
.blog-tag-list a:hover { color: var(--green-deep); }
.blog-tag-list span { font-size: 13.5px; color: var(--ink-3); }

.blog-empty {
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 44px 32px;
  text-align: center;
  color: var(--ink-2);
}

/* ---------- post ---------- */

.blog-hero { margin-bottom: 26px; }
.blog-hero h1 {
  font-size: clamp(30px, 4.4vw, 44px);
  letter-spacing: -0.035em;
  max-width: 22ch;
}
.blog-dek {
  font-size: clamp(17px, 2vw, 20px);
  color: var(--ink-2);
  margin-top: 14px;
  max-width: 58ch;
  font-weight: 450;
}
.blog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 18px;
  font-size: 13.5px;
  color: var(--ink-3);
  font-weight: 600;
}
.blog-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--ink-3); }
.blog-hero-img {
  width: 100%;
  border-radius: var(--radius-sm);
  margin: 26px 0 4px;
  display: block;
}
.blog-hero-cap { font-size: 13px; color: var(--ink-3); margin: 8px 0 0; }

/* Article prose. Class names match @chronic/markdown's output so the admin preview and
   the published page share one vocabulary. */
.blog-body { margin-top: 30px; }
.blog-body > *:first-child { margin-top: 0; }
.blog-body p {
  color: var(--ink-2);
  line-height: 1.7;
  margin: 0 0 18px;
  max-width: 68ch;
  font-size: 17.5px;
}
.blog-body h2 {
  font-size: clamp(22px, 3vw, 28px);
  letter-spacing: -0.03em;
  margin: 40px 0 12px;
  scroll-margin-top: 96px;
}
.blog-body h3 {
  font-size: 19px;
  font-weight: 800;
  color: var(--green-deep);
  margin: 30px 0 8px;
  scroll-margin-top: 96px;
}
.blog-body h4 {
  font-size: 16px;
  font-weight: 800;
  margin: 24px 0 6px;
  scroll-margin-top: 96px;
}
.blog-body .post-list {
  margin: 0 0 18px;
  padding-left: 1.15em;
  color: var(--ink-2);
  display: grid;
  gap: 10px;
  max-width: 68ch;
}
.blog-body .post-list li { line-height: 1.6; padding-left: 4px; }
.blog-body .post-list li::marker { color: var(--green); }
.blog-body a { color: var(--green-deep); font-weight: 600; border-bottom: 1px solid var(--line); }
.blog-body a:hover { border-bottom-color: var(--green-deep); }
.blog-body blockquote {
  margin: 0 0 20px;
  padding: 18px 22px;
  background: var(--green-soft);
  border-radius: var(--radius-sm);
  max-width: 68ch;
}
.blog-body blockquote p { margin: 0; font-size: 18px; color: var(--ink); font-weight: 500; }
.blog-body .post-code {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  overflow-x: auto;
  font-size: 14px;
  margin: 0 0 18px;
}
.blog-body code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: 0.9em;
  background: var(--paper-2);
  padding: 2px 6px;
  border-radius: 6px;
}
.blog-body .post-figure { margin: 0 0 20px; }
.blog-body .post-figure img { width: 100%; border-radius: var(--radius-sm); display: block; }
.blog-body hr { border: none; border-top: 1px solid var(--line); margin: 32px 0; }

.blog-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.blog-related { margin-top: 34px; }
.blog-related h2 { font-size: 22px; letter-spacing: -0.025em; margin-bottom: 14px; }
.blog-related ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.blog-related a { font-weight: 700; color: var(--ink); }
.blog-related a:hover { color: var(--green-deep); }
.blog-related span { display: block; font-size: 14px; color: var(--ink-3); font-weight: 400; }
