/* =====================================================================
   Blog v2: featured Insights card, topic chips, reading layout.
   Loaded after pages.css.
   ===================================================================== */

/* topic chips (Categories block) */
.ip-topics, .wp-block-categories.ip-topics { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 0; padding: 0; list-style: none; }
.ip-topics li { margin: 0; }
.ip-topics a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; background: var(--ip-pale, #eef1ff); color: var(--ip-ink, #0b1440); font-size: .9375rem; font-weight: 550; text-decoration: none; transition: background-color .2s, color .2s, transform .2s; }
.ip-topics a:hover { background: var(--ip-accent, #544ee8); color: #fff; transform: translateY(-2px); }
.ip-topics .current-cat a { background: var(--ip-navy, #0b1440); color: #fff; }
.ip-topic-kicker { margin: 0 0 6px; font-size: .9375rem; }
.ip-topic-kicker a { color: var(--ip-accent, #544ee8); text-decoration: none; font-weight: 600; }
.ip-topic-kicker a::before { content: "\2190  "; }

/* cards: no outline, image zoom on hover */
.inline-blog-card { border: 0 !important; display: flex; flex-direction: column; }
.inline-blog-card .wp-block-post-featured-image img { transition: transform .7s cubic-bezier(.2, .8, .2, 1); }
.inline-blog-card:hover .wp-block-post-featured-image img { transform: scale(1.04); }
.inline-blog-card .wp-block-post-featured-image:not(:has(img)) { display: none; }
.inline-blog-card__text > * + * { margin-top: 8px; }

/* the newest article on Insights and topic pages spans the width as a feature */
@media (min-width: 900px) {
	.ip-blog-feature .wp-block-post-template > li:first-child { grid-column: 1 / -1; }
	.ip-blog-feature .wp-block-post-template > li:first-child .inline-blog-card { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 3vw, 48px); align-items: center; padding: clamp(18px, 2vw, 26px); background: var(--ip-navy, #0b1440); }
	.ip-blog-feature .wp-block-post-template > li:first-child .wp-block-post-featured-image { margin: 0; }
	.ip-blog-feature .wp-block-post-template > li:first-child .wp-block-post-title { font-size: clamp(1.8rem, 2.8vw, 2.6rem); line-height: 1.08; letter-spacing: -.025em; }
	.ip-blog-feature .wp-block-post-template > li:first-child .wp-block-post-title a { color: #fff; }
	.ip-blog-feature .wp-block-post-template > li:first-child :is(.wp-block-post-excerpt, .wp-block-post-date) { color: #c9cff0; }
	.ip-blog-feature .wp-block-post-template > li:first-child .wp-block-post-terms a { color: #a8b4ff; }
	.ip-blog-feature .wp-block-post-template > li:first-child .wp-block-post-excerpt__more-text a { color: #fff; }
}

/* ---------- single post ---------- */
.ip-post.inline-article { max-width: none !important; padding-inline: 0; }
.ip-post > * { max-width: var(--wp--style--global--wide-size, 1360px); margin-inline: auto !important; }
.ip-post__header { max-width: 860px !important; text-align: left; }
.ip-post__topic a { display: inline-flex; padding: 6px 14px; border-radius: 999px; background: var(--ip-pale, #eef1ff); color: var(--ip-accent, #544ee8); font-size: .875rem; font-weight: 600; text-decoration: none; }
.ip-post__title { margin: 18px 0 18px !important; font-size: clamp(2.1rem, 4.4vw, 3.8rem) !important; line-height: 1.02; letter-spacing: -.035em; text-wrap: balance; }
.ip-post__standfirst p { margin: 0; font-size: clamp(1.15rem, 1rem + .6vw, 1.45rem); line-height: 1.45; color: #364070; max-width: 52ch; }
.ip-post__meta { gap: 10px 16px; margin: 26px 0 34px !important; color: #5d6690; font-size: .9375rem; }
.ip-post__meta > * { margin: 0 !important; }
.ip-post__author { color: var(--ip-ink, #0b1440); font-weight: 600; }
.ip-post__readtime:empty { display: none; }
.ip-post__date::before, .ip-post__readtime::before { content: "\00B7"; margin-right: 16px; color: #aab3dc; }
.ip-post__cover { margin-bottom: clamp(36px, 5vw, 64px) !important; }
.ip-post__cover img { width: 100%; max-height: 620px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 26px; }

/* body: contents rail + reading column */
.ip-post__body { display: grid !important; grid-template-columns: minmax(180px, 240px) minmax(0, 720px); justify-content: center; gap: clamp(32px, 5vw, 80px); align-items: start; max-width: 1100px !important; }
.ip-post__body > * { margin: 0 !important; }
.ip-toc { position: sticky; top: 120px; padding: 18px 0 0; font-size: .9375rem; }
.ip-toc:not(.is-ready) { visibility: hidden; }
.ip-toc__title { margin: 0 0 12px; font-size: .8125rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #5d6690; }
.ip-toc ol { margin: 0; padding: 0; list-style: none; border-left: 2px solid var(--ip-pale, #eef1ff); }
.ip-toc li { margin: 0; }
.ip-toc a { display: block; padding: 7px 0 7px 16px; margin-left: -2px; border-left: 2px solid transparent; color: #5d6690; line-height: 1.35; text-decoration: none; transition: color .2s, border-color .2s; }
.ip-toc a:hover { color: var(--ip-ink, #0b1440); }
.ip-toc a.is-current { color: var(--ip-accent, #544ee8); border-left-color: var(--ip-accent, #544ee8); font-weight: 600; }

/* reading typography */
.ip-post__content { max-width: 720px !important; font-size: 1.125rem; line-height: 1.7; color: #1d2752; }
.ip-post__content > * { margin-block: 0 1.15em; }
.ip-post__content h2 { margin-block: 2em .6em !important; scroll-margin-top: 110px; font-size: clamp(1.6rem, 2.6vw, 2.15rem); line-height: 1.15; letter-spacing: -.02em; color: var(--ip-ink, #0b1440); }
.ip-post__content h3 { margin-block: 1.6em .5em !important; scroll-margin-top: 110px; font-size: 1.3rem; line-height: 1.25; color: var(--ip-ink, #0b1440); }
.ip-post__content a { color: var(--ip-accent, #544ee8); text-decoration-thickness: 1.5px; text-underline-offset: .18em; }
.ip-post__content :is(ul, ol):not(.is-style-checks):not(.is-style-tags) { padding-left: 1.3em; }
.ip-post__content li { margin-bottom: .45em; }
.ip-post__content li::marker { color: var(--ip-accent, #544ee8); font-weight: 700; }
.ip-post__content .wp-block-quote { margin-inline: 0; padding: 4px 0 4px 24px; border-left: 4px solid var(--ip-violet, #8a3ffc); font-size: 1.25rem; line-height: 1.5; color: var(--ip-ink, #0b1440); }
.ip-post__content .wp-block-image img { border-radius: 18px; }
.ip-post__content figcaption { font-size: .875rem; color: #5d6690; text-align: center; }
.ip-post__content .wp-block-code { padding: 18px 20px; border-radius: 16px; font-size: .9375rem; }
.ip-post__content .wp-block-separator { margin: 2.4em auto; border: 0; height: 4px; width: 64px; border-radius: 4px; background: var(--ip-pale, #eef1ff); }

/* "Key takeaway" box (Group block style) */
.wp-block-group.is-style-callout { position: relative; padding: 22px 24px 22px 28px !important; border-radius: 18px; background: var(--ip-pale, #eef1ff); }
.wp-block-group.is-style-callout::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 5px; border-radius: 0 5px 5px 0; background: var(--ip-accent, #544ee8); }
.wp-block-group.is-style-callout > :first-child { margin-top: 0 !important; }
.wp-block-group.is-style-callout > :last-child { margin-bottom: 0 !important; }
.wp-block-group.is-style-callout :is(h2, h3, h4) { margin-top: 0 !important; font-size: 1.125rem !important; }

/* end of article */
.ip-post__end { max-width: 1100px !important; margin-top: 48px !important; }
.ip-post__end > * { max-width: 720px; margin-left: auto !important; margin-right: 0 !important; }
.ip-post__tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; }
.ip-post__tags a { padding: 6px 12px; border-radius: 999px; background: var(--ip-tint, #f5f7ff); color: #364070; font-size: .875rem; text-decoration: none; }
.ip-post__tags .wp-block-post-terms__separator { display: none; }
.ip-post__authorbox { gap: 16px; padding: 22px; border-radius: 20px; background: var(--ip-tint, #f5f7ff); }
.ip-post__authorbox > * { margin: 0 !important; }
.ip-post__authorname { font-weight: 650; color: var(--ip-ink, #0b1440); }
.ip-post__bio { margin-top: 4px; color: #364070; font-size: .9375rem; }
.ip-post__cta { max-width: 1100px !important; margin-top: clamp(64px, 8vw, 104px) !important; padding: clamp(36px, 5vw, 64px) !important; border-radius: 28px; background: var(--ip-navy, #0b1440); color: #fff; }
.ip-post__cta h2 { margin: 0 0 10px; color: #fff; font-size: clamp(1.8rem, 3.4vw, 2.8rem); letter-spacing: -.03em; line-height: 1.05; }
.ip-post__cta p { margin: 0 0 22px; color: #c9cff0; font-size: 1.0625rem; }
.ip-post__cta .wp-block-button:not(.is-style-ghost) .wp-block-button__link { background: #fff; color: var(--ip-ink, #0b1440); box-shadow: none; }
.ip-post__cta .is-style-ghost .wp-block-button__link { background: transparent !important; color: #fff !important; border: 2px solid rgba(255, 255, 255, .45) !important; }
.ip-post__related { max-width: 1100px !important; margin-top: clamp(64px, 8vw, 104px) !important; margin-bottom: clamp(48px, 6vw, 80px) !important; }
.ip-post__related-title { margin: 0 0 22px; font-size: clamp(1.6rem, 2.6vw, 2.2rem); letter-spacing: -.02em; }
.ip-post__related .inline-blog-grid { margin: 0 !important; }
.ip-post__related .wp-block-post-title { font-size: 1.15rem !important; }

/* reading progress bar */
.ip-progress { position: fixed; left: 0; top: 0; z-index: 100; width: 100%; height: 4px; background: var(--ip-accent, #544ee8); transform-origin: 0 50%; transform: scaleX(0); pointer-events: none; }

@media (max-width: 1000px) {
	.ip-post__body { grid-template-columns: minmax(0, 1fr); }
	.ip-toc { position: static; padding: 0; }
	.ip-toc ol { display: none; }
	.ip-toc.is-open ol { display: block; margin-top: 12px; }
	.ip-toc__title { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; margin: 0; padding: 0 16px; border-radius: 999px; background: var(--ip-pale, #eef1ff); cursor: pointer; }
	.ip-toc__title::after { content: "+"; font-size: 1.1rem; }
	.ip-toc.is-open .ip-toc__title::after { content: "\2013"; }
	.ip-post__end > * { margin-left: 0 !important; }
}
@media (max-width: 700px) {
	.ip-post__content { font-size: 1.0625rem; }
	.ip-post__cover img { border-radius: 18px; aspect-ratio: 4 / 3; }
	.ip-post__cta { border-radius: 20px; }
	.ip-post__date::before, .ip-post__readtime::before { margin-right: 10px; }
}
@media (prefers-reduced-motion: reduce) {
	.inline-blog-card .wp-block-post-featured-image img, .ip-topics a, .ip-toc a { transition: none; }
}

@media (max-width: 700px) {
	.ip-post__related .wp-block-post-template, .inline-blog-grid .wp-block-post-template { grid-template-columns: minmax(0, 1fr) !important; }
	.ip-post__date::before, .ip-post__readtime::before { content: none; }
	.ip-post__meta { gap: 6px 14px; }
}
