/* Blog index — editorial: serif headline, warm paper, flat list.
   Scoped entirely to body.blog-index; shared uf-chrome.css (used by
   privacy.html, terms.html, etc.) is untouched. */
body.blog-index {
  --paper: #faf6ee;
  --ink: #2b2620;
  --muted: #8a7f6c;
  --line: #e7ddc9;
  --card: #fffdf8;
  background: var(--paper) !important;
  color: var(--ink);
}

html[data-theme='dark'] body.blog-index {
  --paper: #1c1813;
  --ink: #f3ede1;
  --muted: #a89a84;
  --line: rgba(243, 237, 225, 0.14);
  --card: #221d16;
  background: var(--paper) !important;
}

body.blog-index .gradient-surface,
body.blog-index .grain {
  display: none;
}

/* Same header re-tone as the article pages — avoids the cool-navy seam
   against the warm dark paper. */
html[data-theme='dark'] body.blog-index {
  --header-bg: rgba(28, 24, 19, 0.82);
  --header-border: rgba(243, 237, 225, 0.1);
  --chip-bg: rgba(243, 237, 225, 0.07);
  --chip-ink: var(--ink);
  --btn-light-bg: rgba(243, 237, 225, 0.1);
  --btn-light-ink: var(--ink);
  --soft: rgba(243, 237, 225, 0.04);
}

body.blog-index .page-hero {
  text-align: left;
  padding: 4.5rem 0 3rem;
}

body.blog-index .page-hero h1 {
  font-family: 'Newsreader', Georgia, 'Times New Roman', serif;
  font-weight: 500;
  font-size: clamp(2.5rem, 6vw, 4rem);
  letter-spacing: -0.01em;
  line-height: 1.05;
  margin: 10px 0 0;
}

body.blog-index .page-hero p {
  font-family: 'Newsreader', Georgia, serif;
  font-style: italic;
  font-size: 1.25rem;
  line-height: 1.5;
  margin: 1rem 0 0;
  max-width: 42em;
  color: var(--muted);
}

/* Featured post — one deliberate focal point so the page has an entry
   point, instead of ten identical rows. */
body.blog-feature {
  margin-top: 0.5rem;
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 2.25rem 2rem;
}

.feature-card h2 {
  margin: 0.6rem 0 0.75rem;
  font-size: clamp(1.6rem, 3.4vw, 2.1rem);
  font-weight: 700;
}

.feature-card h2 a {
  color: var(--ink);
  text-decoration: none;
}

.feature-card p {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 44em;
}

.feature-cta a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 2px;
}

.feature-cta a:hover {
  text-decoration-color: var(--ink);
}

/* Shared uf-chrome.css hovers post titles to blue; keep it ink here. */
body.blog-index .blog-card h2 a:hover,
body.blog-index .feature-card h2 a:hover {
  color: var(--ink);
  text-decoration: underline;
}

/* Grouped sections — the series read as a path (start here → runtime →
   billing), not a reverse-chron dump. */
.blog-group {
  margin-top: 3rem;
}

.group-label {
  margin: 0 0 1.25rem;
  font-family: 'Newsreader', Georgia, serif;
  font-style: italic;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--muted);
}

.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  column-gap: 2.5rem;
  row-gap: 2rem;
}

@media (min-width: 760px) {
  .blog-grid {
    grid-template-columns: 1fr 1fr;
  }
}

body.blog-index .blog-card {
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
  margin: 0;
  padding: 0;
}

body.blog-index .blog-card h2 {
  font-family: Archivo, sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
}

body.blog-index .blog-card p {
  color: var(--muted);
}

body.blog-index .meta-row .chip {
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--muted);
}

/* Tag color maps to the group a post is filed under on this page
   (Start here / Runtime / Billing) — same system as the article pages. */
body.blog-index .meta-row .chip--start {
  background: var(--ok-bg);
  border: 1px solid var(--ok-border);
  color: var(--ok-ink);
}

body.blog-index .meta-row .chip--runtime {
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.28);
  color: #6366f1;
}

html[data-theme='dark'] body.blog-index .meta-row .chip--runtime {
  background: rgba(99, 102, 241, 0.16);
  border-color: rgba(129, 140, 248, 0.35);
  color: #818cf8;
}

body.blog-index .meta-row .chip--billing {
  background: rgba(217, 119, 6, 0.12);
  border: 1px solid rgba(217, 119, 6, 0.28);
  color: #d97706;
}

html[data-theme='dark'] body.blog-index .meta-row .chip--billing {
  background: rgba(232, 163, 61, 0.16);
  border-color: rgba(232, 163, 61, 0.35);
  color: #e8a33d;
}

body.blog-index .meta-row .meta-date {
  color: var(--muted);
}

body.blog-index .card-cta a {
  margin-top: 0.75rem;
  display: inline-block;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}

body.blog-index .card-cta a:hover {
  color: var(--ink);
}
