/* ═══════════════════════════════════════════════════════════════════
   BLOG — index (/blog/) and articles (/blog/<slug>)
   Calm editorial reading: a narrow measure, generous line height,
   Fraunces headings over Inter body text, and quiet cards for posts.
   Loaded after styles.css on blog pages only.
   ═══════════════════════════════════════════════════════════════════ */

/* ── index hero ── */
.blog-hero { text-align: center; padding-bottom: clamp(36px, 4vw, 56px); }
.blog-hero .ed-kicker { justify-content: center; }
.blog-hero .ed-kicker::before { display: none; }
.blog-hero h1 { max-width: 18ch; margin: 14px auto 18px; font-size: clamp(2.4rem, 5vw, 3.9rem); line-height: 1.05; letter-spacing: -.03em; }
.blog-hero h1 em { color: var(--sky-500); }
.blog-hero p { max-width: 58ch; margin: 0 auto; font-size: 1.08rem; line-height: 1.75; color: var(--body); }

/* ── post cards ── */
.post-list { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; padding: 0; list-style: none; }
.post-card {
  position: relative; display: flex; flex-direction: column; height: 100%; overflow: hidden;
  background: #fff; border: 1px solid var(--line-soft); border-radius: 26px; box-shadow: var(--e1);
  transition: box-shadow .3s var(--ease), transform .3s var(--ease);
}
.post-card:hover { box-shadow: var(--e3); transform: translateY(-3px); }
.post-card img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.post-card-body { display: flex; flex-direction: column; flex: 1; padding: 26px 28px 28px; }
.post-card h2, .post-card h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); line-height: 1.22; margin: 14px 0 10px; letter-spacing: -.015em; }
.post-card h2 a, .post-card h3 a { color: var(--ink); text-decoration: none; }
.post-card h2 a::after, .post-card h3 a::after { content: ''; position: absolute; inset: 0; } /* whole card is clickable */
.post-card p { font-size: .97rem; line-height: 1.7; color: var(--body); margin: 0 0 18px; }
.post-meta { margin-top: auto; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .82rem; color: var(--muted); }
.post-meta span + span::before { content: '·'; margin-right: 14px; color: var(--line); }
.post-tag {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px;
  background: var(--sky-100); color: var(--navy-600); font-size: .7rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
}
.post-tag::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--sky-500); }

/* featured (first) post spans the full width */
.post-list > li:first-child { grid-column: 1 / -1; }
.post-list > li:first-child .post-card { display: grid; grid-template-columns: 1.1fr 1fr; }
.post-list > li:first-child .post-card img { height: 100%; aspect-ratio: auto; min-height: 320px; }
.post-list > li:first-child .post-card-body { padding: clamp(28px, 4vw, 48px); justify-content: center; }
.post-list > li:first-child h2 { font-size: clamp(1.6rem, 2.8vw, 2.2rem); }

/* ── article ── */
.post-head { max-width: 780px; margin: 0 auto; text-align: center; }
.post-head .post-tag { align-self: center; }
.post-head h1 { margin: 18px 0 16px; font-size: clamp(2.1rem, 4.4vw, 3.3rem); line-height: 1.08; letter-spacing: -.028em; }
.post-dek { font-size: clamp(1.05rem, 1.4vw, 1.2rem); line-height: 1.65; color: var(--body); max-width: 60ch; margin: 0 auto; }
.post-head .post-meta { justify-content: center; margin-top: 22px; }
.post-hero { max-width: 1080px; margin: clamp(32px, 4vw, 48px) auto 0; border-radius: 28px; overflow: hidden; box-shadow: var(--e2); }
.post-hero img { display: block; width: 100%; aspect-ratio: 16 / 8; object-fit: cover; }

.article-body { max-width: 700px; margin: 0 auto; font-size: 1.08rem; line-height: 1.8; color: #2E4359; }
.article-body > * + * { margin-top: 1.1em; }
.article-body h2 { font-size: clamp(1.5rem, 2.4vw, 1.95rem); line-height: 1.2; letter-spacing: -.02em; color: var(--ink); margin-top: 2em; }
.article-body h3 { font-size: 1.22rem; color: var(--ink); margin-top: 1.6em; }
.article-body a { color: var(--navy-700); font-weight: 600; text-decoration: underline; text-decoration-color: var(--sky-200); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.article-body a:hover { text-decoration-color: var(--sky-500); }
.article-body ul, .article-body ol { padding-left: 1.3em; }
.article-body li + li { margin-top: .5em; }
.article-body li::marker { color: var(--sky-500); }
.article-body strong { color: var(--ink); }

.takeaways { padding: 24px 28px; border-radius: 22px; background: var(--mist); border: 1px solid var(--line-soft); }
.takeaways h2 { margin: 0 0 10px; font-size: 1.05rem; font-family: inherit; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--navy-600); }
.takeaways ul { margin: 0; }
.note { padding: 18px 22px; border-left: 3px solid var(--sky-500); border-radius: 0 16px 16px 0; background: var(--sky-100); font-size: 1rem; }
.note strong { display: block; margin-bottom: 2px; }

.steps-list { list-style: none; padding: 0; counter-reset: s; }
.steps-list li { position: relative; padding-left: 52px; counter-increment: s; }
.steps-list li + li { margin-top: 1.1em; }
.steps-list li::before {
  content: counter(s); position: absolute; left: 0; top: 2px; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; background: var(--navy-700); color: #fff; font-family: Fraunces, Georgia, serif; font-size: 1rem;
}

.cmp-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .96rem; line-height: 1.55; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.cmp-table th, .cmp-table td { padding: 14px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line-soft); }
.cmp-table thead th { background: var(--navy-700); color: #fff; font-size: .85rem; letter-spacing: .04em; }
.cmp-table tbody th { color: var(--ink); width: 26%; background: var(--mist-2); }
.cmp-table tr:last-child th, .cmp-table tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }

.post-cta {
  max-width: 700px; margin: clamp(44px, 5vw, 64px) auto 0; padding: clamp(26px, 4vw, 40px); border-radius: 26px; text-align: center; color: #fff;
  background: radial-gradient(60% 90% at 15% 0%, rgba(127,182,220,.28), transparent 65%), linear-gradient(160deg, #1F4472, #123059);
}
.post-cta h2 { color: #fff; font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin: 0 0 10px; }
.post-cta p { color: rgba(255,255,255,.82); margin: 0 auto 22px; max-width: 46ch; line-height: 1.7; }
.post-cta .actions-center { gap: 12px; }
.post-cta .btn-ghost { color: #fff; border-color: rgba(255,255,255,.4); }
.post-cta .btn-ghost:hover { background: rgba(255,255,255,.08); border-color: #fff; }
.post-disclaimer { max-width: 700px; margin: 28px auto 0; font-size: .84rem; line-height: 1.6; color: var(--muted); text-align: center; }

.related-head { max-width: 1180px; margin: 0 auto 26px; display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.related-head h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 0; }
.related-head a { font-weight: 700; color: var(--navy-700); }
.post-list--related > li:first-child { grid-column: auto; }
.post-list--related > li:first-child .post-card { display: flex; }
.post-list--related > li:first-child .post-card img { height: auto; aspect-ratio: 16 / 9; min-height: 0; }
.post-list--related > li:first-child .post-card-body { padding: 26px 28px 28px; }
.post-list--related > li:first-child h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); }

@media (max-width: 860px) {
  .post-list { grid-template-columns: 1fr; }
  .post-list > li:first-child .post-card { display: flex; }
  .post-list > li:first-child .post-card img { height: auto; aspect-ratio: 16 / 9; min-height: 0; }
  .post-hero img { aspect-ratio: 16 / 10; }
}
@media (max-width: 560px) {
  .article-body { font-size: 1.03rem; }
  .cmp-table { font-size: .88rem; }
  .cmp-table th, .cmp-table td { padding: 11px 12px; }
}
@media (prefers-reduced-motion: reduce) { .post-card { transition: none; } .post-card:hover { transform: none; } }
