/* WarmBow guides: blog index, topic hubs and articles. Builds on design-v6.css and polish-v7.css. */
.blog-main { padding-bottom: clamp(48px, 6vw, 80px); }
.blog-main > *, .article > * { width: var(--frame-width); margin-inline: auto; }
.article { width: 100%; }

/* Framed hero cards, matching the home page sections. */
.blog-hero { position: relative; margin-top: 20px; padding: clamp(36px, 5vw, 64px) clamp(24px, 4.5vw, 56px); border-radius: 28px; background: var(--sky); overflow: hidden; isolation: isolate; }
.blog-hero:after { content: ''; position: absolute; z-index: -1; right: -60px; top: -70px; width: clamp(180px, 24vw, 300px); aspect-ratio: 1; border-radius: 50%; background: var(--gold); opacity: .9; }
.blog-hero:before { content: ''; position: absolute; z-index: -1; right: clamp(120px, 20vw, 250px); bottom: -40px; width: 90px; aspect-ratio: 1; border-radius: 50%; background: var(--pink); }
.blog-hero h1 { margin: 0; font: 800 clamp(48px, 7vw, 92px)/.98 var(--display); letter-spacing: -.05em; color: var(--navy); }
.blog-hero .crumbs { margin-bottom: 18px; }
.blog-hero-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.blog-hero-row h1 { font-size: clamp(40px, 5.6vw, 72px); max-width: 15ch; }
.collection-count { display: grid; place-items: center; flex: 0 0 auto; width: 64px; height: 64px; border-radius: 50%; background: #fff; color: var(--blue); font: 800 20px/1 var(--display); box-shadow: 0 6px 16px #142c5812; font-variant-numeric: tabular-nums; }
.topic-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: clamp(28px, 3.5vw, 40px); max-width: 860px; }
.topic-chips a { padding: 9px 16px; border: 1px solid #cddbf5; border-radius: 999px; background: #fff; color: var(--navy); font-size: 13px; font-weight: 600; line-height: 1.3; transition: background .18s, color .18s, border-color .18s, transform .18s; }
.topic-chips a:hover { background: var(--blue); border-color: var(--blue); color: #fff; transform: translateY(-2px); }

.blog-section { margin-top: clamp(48px, 6vw, 72px); }
.blog-section .section-heading { align-items: flex-end; margin-bottom: 24px; }
.blog-section .section-heading h2 { font-family: var(--display); font-weight: 800; }
.topic-all { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; padding: 8px 14px; border-radius: 999px; background: #f2f6ff; color: var(--blue); font-size: 13px; font-weight: 600; transition: background .18s, gap .18s; }
.topic-all:hover { background: #e3ecff; gap: 12px; }

/* Post cards. */
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.post-card { --tint: var(--sky); display: flex; flex-direction: column; min-width: 0; border-radius: 22px; background: var(--tint); overflow: hidden; transition: transform .28s cubic-bezier(.2,.8,.2,1), box-shadow .28s; }
.post-card:nth-child(3n+2) { --tint: #fff4d1; }
.post-card:nth-child(3n+3) { --tint: #fde7ef; }
.post-card:hover { transform: translateY(-4px); box-shadow: 0 18px 34px #142c5817; }
.post-card-img { display: block; margin: 8px 8px 0; border-radius: 16px; overflow: hidden; aspect-ratio: 3 / 2; background: #dfe8f8; }
.post-card-img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.post-card:hover .post-card-img img { transform: scale(1.045); }
.post-card-body { display: flex; flex: 1; flex-direction: column; gap: 10px; padding: 18px 20px 22px; }
.post-card-topic { align-self: flex-start; padding: 4px 10px; border-radius: 999px; background: #ffffffb8; color: var(--blue); font-size: 11px; font-weight: 600; line-height: 1.4; }
.post-card-title { font: 700 19px/1.3 var(--display); letter-spacing: -.02em; color: var(--navy); }
.post-card-meta { margin-top: auto; padding-top: 4px; color: #5d6f8d; font-size: 12px; }

/* Article. */
.article-head { padding-top: clamp(32px, 5vw, 56px); }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: #5d6f8d; font-size: 13px; font-weight: 500; }
.crumbs a { color: var(--blue); }
.crumbs a:hover { text-decoration: underline; text-underline-offset: 4px; }
.article-head h1 { max-width: 20ch; margin: 18px 0 22px; font: 800 clamp(36px, 4.8vw, 62px)/1.06 var(--display); letter-spacing: -.04em; color: var(--navy); text-wrap: balance; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; color: #4d6085; font-size: 13px; }
.article-meta > span:not(.agent-links) { padding: 6px 12px; border-radius: 999px; background: #f2f6ff; }
.agent-links { display: inline-flex; gap: 6px; margin-left: auto; }
.agent-links a { padding: 6px 11px; border: 1px dashed #b9cbeb; border-radius: 999px; color: var(--blue); font-size: 12px; font-weight: 600; transition: background .18s, border-color .18s; }
.agent-links a:hover { background: #edf3ff; border-style: solid; }
.article-cover { margin-top: clamp(24px, 3vw, 36px); margin-bottom: 0; border-radius: 28px; overflow: hidden; aspect-ratio: 16 / 7.5; background: #dfe8f8; }
.article-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }

.article-layout { display: grid; grid-template-columns: 240px minmax(0, 720px); justify-content: center; gap: clamp(40px, 6vw, 88px); margin-top: clamp(36px, 5vw, 64px); }
.article-layout:not(:has(.article-toc)) { grid-template-columns: minmax(0, 720px); }
.article-toc { position: sticky; top: 24px; align-self: start; padding: 20px; border-radius: 20px; background: #f6f8fd; font-size: 13px; }
.article-toc p { margin: 0 0 12px; color: var(--navy); font: 700 14px/1.3 var(--display); }
.article-toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; display: grid; gap: 2px; }
.article-toc li { counter-increment: toc; }
.article-toc a { display: grid; grid-template-columns: 22px 1fr; gap: 6px; padding: 7px 8px; border-radius: 10px; color: #3f557d; line-height: 1.4; transition: background .18s, color .18s; }
.article-toc a:before { content: counter(toc, decimal-leading-zero); color: #9aaccb; font-size: 11px; font-weight: 600; padding-top: 1px; font-variant-numeric: tabular-nums; }
.article-toc a:hover { background: #fff; color: var(--blue); }

.prose { min-width: 0; color: #22365c; font-size: 17px; line-height: 1.78; }
.prose > :first-child { margin-top: 0; }
.prose > p:first-child { color: var(--navy); font-size: 19.5px; line-height: 1.65; font-weight: 500; }
.prose p { margin: 0 0 20px; }
.prose h2 { margin: 52px 0 16px; font: 800 clamp(25px, 2.4vw, 31px)/1.2 var(--display); letter-spacing: -.03em; color: var(--navy); scroll-margin-top: 24px; text-wrap: balance; }
.prose h3 { margin: 32px 0 10px; font: 700 20px/1.35 var(--display); letter-spacing: -.015em; color: var(--navy); scroll-margin-top: 24px; }
.prose h4 { margin: 24px 0 8px; font-size: 17px; }
.prose a { color: var(--blue); font-weight: 500; text-decoration: underline; text-decoration-color: #9fb9ec; text-decoration-thickness: 1.5px; text-underline-offset: 4px; transition: text-decoration-color .18s, background .18s; }
.prose a:hover { text-decoration-color: var(--blue); background: #edf3ff; border-radius: 3px; }
.prose strong { color: var(--navy); font-weight: 700; }
.prose ul, .prose ol { margin: 0 0 22px; padding-left: 24px; }
.prose li { margin: 8px 0; padding-left: 4px; }
.prose li::marker { color: var(--blue); font-weight: 700; }
.prose ul li::marker { content: '●  '; font-size: .62em; }
.prose blockquote { margin: 28px 0; padding: 20px 24px; border-radius: 18px; background: #fff7dc; color: var(--navy); }
.prose blockquote p { margin: 0; }
.prose hr { margin: 40px 0; border: 0; border-top: 1px solid var(--line); }
.prose code { padding: 2px 6px; border-radius: 6px; background: #f2f6ff; font-size: .9em; }
.table-wrap { margin: 28px 0; border: 1px solid #dfe6f2; border-radius: 18px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.prose table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.prose th { padding: 13px 16px; background: #eef3fd; color: var(--navy); font-weight: 700; text-align: left; white-space: nowrap; }
.prose td { padding: 13px 16px; border-top: 1px solid #e6ecf5; vertical-align: top; }
.prose tbody tr:nth-child(even) td { background: #fafbfe; }
.prose #frequently-asked-questions { margin-top: 64px; padding-top: 40px; border-top: 2px solid var(--navy); }
.prose #frequently-asked-questions ~ h3 { margin: 0; padding: 22px 0 8px; border-top: 1px solid var(--line); font-size: 18px; }
.prose #frequently-asked-questions + h3 { border-top: 0; padding-top: 4px; }
.prose #frequently-asked-questions ~ p { color: #3a4f75; }

.article-cta { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 28px; margin-top: clamp(56px, 7vw, 88px); padding: clamp(32px, 4.5vw, 52px) clamp(24px, 4.5vw, 56px); border-radius: 28px; background: var(--blue); color: #fff; overflow: hidden; isolation: isolate; }
.article-cta:after { content: ''; position: absolute; z-index: -1; right: -50px; bottom: -90px; width: 260px; aspect-ratio: 1; border-radius: 50%; background: #ffffff14; }
.article-cta h2 { margin: 0 0 8px; font: 800 clamp(30px, 3.4vw, 42px)/1.1 var(--display); letter-spacing: -.035em; }
.article-cta p { max-width: 520px; margin: 0; color: #dfe8ff; font-size: 15px; }
.article-cta .btn { flex: 0 0 auto; border-color: #fff; background: #fff; color: var(--blue); }
.article-cta .btn:hover { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.related { margin-top: clamp(48px, 6vw, 72px); }
.related h2 { margin: 0 0 24px; font: 800 clamp(30px, 3.2vw, 40px)/1.15 var(--display); letter-spacing: -.03em; color: var(--navy); }

/* Reading progress, where scroll-driven animations are supported. */
@supports (animation-timeline: scroll()) {
  [data-view="blog"] .article:before { content: ''; position: fixed; z-index: 50; top: 0; left: 0; width: 100%; height: 3px; background: linear-gradient(90deg, var(--blue), #e9789a, var(--gold)); transform-origin: 0 50%; transform: scaleX(0); animation: wb-read linear both; animation-timeline: scroll(root); }
  @keyframes wb-read { to { transform: scaleX(1); } }
}

/* Gentle entrance for cards. */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .post-card { animation: wb-rise linear both; animation-timeline: view(); animation-range: entry 0% entry 40%; }
    @keyframes wb-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
  }
}
@media (prefers-reduced-motion: reduce) {
  .post-card, .post-card-img img, .topic-chips a { transition: none; animation: none; }
}

@media (max-width: 1080px) {
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .article-layout { grid-template-columns: minmax(0, 720px); }
  .article-toc { position: static; }
  .article-toc ol { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 8px; }
}
@media (max-width: 720px) {
  .post-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .blog-hero { border-radius: 22px; }
  .blog-hero:after { width: 150px; right: -50px; top: -60px; }
  .blog-hero:before { display: none; }
  .blog-hero-row { align-items: flex-start; flex-direction: column-reverse; gap: 14px; }
  .collection-count { width: 52px; height: 52px; font-size: 17px; }
  .topic-chips { gap: 8px; }
  .topic-chips a { padding: 8px 13px; font-size: 12px; }
  .blog-section .section-heading { flex-direction: row; align-items: center; }
  .article-head h1 { max-width: none; }
  .agent-links { margin-left: 0; }
  .article-cover { border-radius: 20px; aspect-ratio: 4 / 3; }
  .article-toc ol { grid-template-columns: minmax(0, 1fr); }
  .prose { font-size: 16.5px; line-height: 1.75; }
  .prose > p:first-child { font-size: 18px; }
  .prose h2 { margin-top: 44px; }
  .article-cta { flex-direction: column; align-items: stretch; border-radius: 22px; }
  .article-cta .btn { justify-content: space-between; }
  .post-card-title { font-size: 18px; }
}
