/* The blog (heartpact.me/blog, built by website/blog-build): on top of site.css, phone first, wider screens upward. */

.blog-top { display: flex; align-items: center; gap: 4px 14px; }
.blog-top a:not(.pill) { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; color: #FFFFFF; font-weight: 700; text-decoration: none; }
.blog-top a:not(.pill):hover { text-decoration: underline; }

.blog { background: #FFFFFF; }
.blog-wrap { max-width: var(--wrap); margin: 0 auto; padding: 24px 16px 64px; }
.blog h1 { margin: 0 0 10px; font-family: var(--display); font-weight: 800; font-size: clamp(36px, 9vw, 60px); line-height: 1; letter-spacing: -0.035em; }
.blog-page { color: var(--ink-2); font-size: 0.6em; letter-spacing: -0.02em; }
.blog-lede { max-width: 640px; margin: 0 0 22px; font-size: 18px; color: var(--ink-2); }
.blog-empty { margin: 32px 0; font-size: 18px; color: var(--ink-2); }

/* Breadcrumbs */
.crumbs ol { display: flex; flex-wrap: wrap; margin: 0 0 18px; padding: 0; list-style: none; font: 600 14px/1.4 var(--body); color: var(--ink-2); }
.crumbs li { display: flex; align-items: center; min-width: 0; }
.crumbs li + li::before { content: "/"; margin: 0 8px; color: #A4A8C6; }
.crumbs a { display: inline-flex; align-items: center; min-height: 32px; color: var(--ink-2); }
.crumbs [aria-current] { color: var(--ink); }
/* On a phone the post's own title is the page's heading, so the trail stops at its category. */
.post .crumbs [aria-current] { display: none; }

/* Categories: one scrolling row on a phone. */
.blog-cats { display: flex; gap: 8px; margin: 0 -16px 26px; padding: 2px 16px 6px; overflow-x: auto; scrollbar-width: none; }
.blog-cats::-webkit-scrollbar { display: none; }
.blog-cats a { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 22px; background: #FFFFFF; box-shadow: inset 0 0 0 2px #E4E6F3; color: var(--ink-2); font-weight: 700; font-size: 15px; text-decoration: none; white-space: nowrap; }
.blog-cats a:hover { color: var(--navy); box-shadow: inset 0 0 0 2px var(--ink-soft); }
.blog-cats a[aria-current] { background: var(--navy); box-shadow: none; color: #FFFFFF; }

/* Post cards */
.post-list { display: grid; gap: 18px; margin: 0; padding: 0; list-style: none; }
.post-card a { display: flex; flex-direction: column; height: 100%; overflow: hidden; border-radius: 24px; background: #FFFFFF; color: var(--ink); text-decoration: none;
  box-shadow: 0 0 0 1px #E4E6F3, 0 14px 30px -22px rgba(31, 37, 87, 0.45); transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out); }
.post-card a:hover { color: var(--ink); transform: translateY(-2px); box-shadow: 0 0 0 1px var(--ink-soft), 0 18px 36px -22px rgba(31, 37, 87, 0.55); }
.post-card img { width: 100%; height: auto; aspect-ratio: 1200 / 630; background: var(--tint); }
.post-card-text { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 20px; }
.post-card-cat { font: 800 12.5px/1.3 var(--body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--peri-ink); }
.post-card-title { margin: 0; font-family: var(--display); font-weight: 800; font-size: 22px; line-height: 1.15; letter-spacing: -0.02em; }
.post-card-desc { font-size: 15.5px; line-height: 1.5; color: var(--ink-2); }
.post-card-meta { margin-top: 4px; font-size: 14px; color: var(--ink-2); }

.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 36px 0 0; }
.pager a, .pager span { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 12px; border-radius: 22px; font-weight: 700; text-decoration: none; }
.pager a { box-shadow: inset 0 0 0 2px #E4E6F3; }
.pager span { background: var(--navy); color: #FFFFFF; }

/* A post */
.post { max-width: 760px; margin: 0 auto; padding: 24px 16px 56px; }
.post-cat { margin: 0 0 12px; }
.post-cat a { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border-radius: 16px; background: var(--tint); color: var(--navy); font: 800 13px/1 var(--body); letter-spacing: 0.04em; text-decoration: none; }
.post-head h1 { font-size: clamp(34px, 8.5vw, 54px); line-height: 1.04; }
.post-dek { margin: 12px 0 10px; font-size: 19px; line-height: 1.5; color: var(--ink-2); }
.post-meta { margin: 0; font-size: 14.5px; color: var(--ink-2); }
.post-cover { margin: 22px -16px 8px; }
.post-cover img { width: 100%; height: auto; aspect-ratio: 1200 / 630; background: var(--tint); }

.post-body { font-size: 18px; line-height: 1.65; }
.post-body p, .post-body li { color: #2B3058; }
.post-body h2 { margin: 44px 0 10px; font-family: var(--display); font-weight: 800; font-size: 28px; line-height: 1.12; letter-spacing: -0.025em; scroll-margin-top: 20px; }
.post-body h3 { margin: 30px 0 6px; font-size: 20px; line-height: 1.3; scroll-margin-top: 20px; }
.post-body ul, .post-body ol { padding-inline-start: 24px; }
.post-body li { margin: 6px 0; }
.post-body blockquote { margin: 26px 0; padding: 4px 0 4px 18px; border-inline-start: 4px solid var(--peri); color: var(--ink-2); }
.post-body code { padding: 1px 6px; border-radius: 6px; background: var(--wash); font-size: 0.92em; }
.post-body pre { overflow-x: auto; padding: 14px; border-radius: 14px; background: var(--wash); }
.post-body pre code { padding: 0; background: none; }
.post-body hr { margin: 36px 0; border: 0; border-top: 2px dashed #E4E6F3; }
.post-body img { max-width: 100%; }
.post-body .table-scroll { overflow-x: auto; margin: 22px 0; }
.post-body table { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.45; }
.post-body th, .post-body td { padding: 10px 12px; border-bottom: 1px solid #E4E6F3; text-align: start; vertical-align: top; }
.post-body th { background: var(--wash); color: var(--ink); }

/* An app screen in a phone frame */
.blog-screen { margin: 34px 0; text-align: center; }
.phone-frame { width: min(270px, 70vw); margin: 0 auto; padding: 8px; border-radius: 40px; background: var(--ink); box-shadow: 0 24px 48px -26px rgba(22, 26, 61, 0.6); }
.phone-frame img { width: 100%; height: auto; border-radius: 32px; background: #E3E5F6; }
.blog-screen figcaption { max-width: 420px; margin: 14px auto 0; font-size: 15px; line-height: 1.45; color: var(--ink-2); }

/* The "Get Heartpact" box (getapp.js shows each device its own way in) */
.blog-cta { margin: 40px 0; padding: 26px 18px 24px; border-radius: 28px; background: var(--tint); text-align: center; }
.blog-cta-title { margin: 0 0 6px; font-family: var(--display); font-weight: 800; font-size: 26px; line-height: 1.1; letter-spacing: -0.025em; color: var(--ink); }
.blog-cta-text { max-width: 480px; margin: 0 auto 18px; font-size: 16px; line-height: 1.5; color: var(--ink-2); }
.blog-cta .get { gap: 12px 22px; }
.blog-cta .play img { height: 64px; }
.blog-cta .get-qr img { width: 96px; height: 96px; }

.post-faq { margin: 48px 0 0; }
.post-faq h2 { margin: 0 0 6px; font-family: var(--display); font-weight: 800; font-size: 28px; letter-spacing: -0.025em; }
.post-faq h3 { margin: 22px 0 4px; font-size: 18.5px; line-height: 1.35; }
.post-faq p { margin: 0; font-size: 17px; line-height: 1.6; color: var(--ink-2); }

.post-related { background: var(--wash); }
.post-related h2 { margin: 0 0 18px; font-family: var(--display); font-weight: 800; font-size: 28px; letter-spacing: -0.025em; }
.post-related .blog-wrap { padding-top: 40px; padding-bottom: 56px; }

@media (min-width: 640px) {
  .blog-wrap { padding: 36px 24px 80px; }
  .blog-cats { flex-wrap: wrap; margin: 0 0 30px; padding: 0; overflow: visible; }
  .post-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .post { padding: 36px 24px 72px; }
  .post .crumbs [aria-current] { display: flex; }
  .post-cover { margin: 26px 0 10px; }
  .post-cover img { border-radius: 24px; }
  .blog-cta { padding: 32px 28px 28px; }
}

@media (min-width: 980px) {
  .post-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .post { max-width: 860px; }
  .post-head, .post-body, .post-faq, .post .blog-cta { max-width: 720px; margin-inline: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .post-card a { transition: none; }
  .post-card a:hover { transform: none; }
}

/* A 360-414 px phone: the brand and "Get the app" keep one line; the breadcrumbs lead back to the blog. */
.blog-top .pill { white-space: nowrap; }
@media (max-width: 419px) {
  .page-head .blog-top a:not(.pill) { display: none; }
  .page-head .blog-top .pill { padding: 0 14px; }
}
