/* Content pages: blog, posts, archives, search, 404, AI Index, AI Visibility Tool. */

/* ---------- Blog hero + topic chips ---------- */
.blog-hero { padding-bottom: 48px; }
.blog-hero__title { font-size: clamp(38px, 5vw, 64px); overflow-wrap: break-word; }
.blog-hero__page { color: var(--muted-2); font-size: .5em; letter-spacing: -0.01em; white-space: nowrap; }
.archive-desc > * + * { margin-top: .6em; }
.chips-band { background: var(--sand); }
.chips--topics { padding: 20px var(--gutter); gap: 10px; }
.chips--topics .chip { white-space: nowrap; }
@media (max-width: 700px) {
	/* One swipeable row on phones instead of a tall stack of chips. */
	.chips--topics { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
	.chips--topics::-webkit-scrollbar { display: none; }
	.chips--topics .chips__label { flex-shrink: 0; }
}
.chip.is-current { background: var(--ink); color: var(--bg); font-weight: 600; }
a.chip.is-current:hover { background: var(--ink-2); color: var(--bg); }

/* ---------- Post cards ---------- */
.post-card .card__more { padding-top: 4px; }
.post-card h2, .post-card h3 { overflow-wrap: break-word; }
.post-card__ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--muted-2); background-image: radial-gradient(rgba(43,38,34,.10) 1.2px, transparent 1.2px); background-size: 14px 14px; }
.blog-featured { margin-bottom: 64px; }
.post-card--featured .post-card__body { padding: 28px 28px 32px; gap: 14px; }
.post-card--featured h2, .post-card--featured h3 { font-size: clamp(26px, 3vw, 38px); line-height: 1.1; letter-spacing: -0.03em; }
.post-card--featured p { font-size: 18px; }
@media (min-width: 900px) {
	.post-card--featured { flex-direction: row; }
	.post-card--featured .post-card__img { flex: 1.25 1 0; aspect-ratio: auto; min-height: 380px; }
	.post-card--featured .post-card__body { flex: 1 1 0; padding: 48px 44px; justify-content: center; }
}
.blog-grid-title { margin-bottom: 28px; }

/* WordPress pagination markup: nav.pagination > .nav-links > .page-numbers */
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pagination .page-numbers.dots { background: none; min-width: 24px; padding: 0 4px; }

/* ---------- Newsletter ---------- */
.newsletter { background: var(--sand); border-radius: var(--r-lg); padding: clamp(28px, 5vw, 56px); display: flex; flex-wrap: wrap; gap: 32px 48px; align-items: center; }
.newsletter__copy { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.newsletter__form { flex: 1 1 360px; min-width: 0; background: var(--bg); border-radius: var(--r-md); padding: 28px; }
.newsletter__form input:not([type=checkbox]):not([type=radio]):not([type=submit]) { width: 100%; min-height: 50px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--white); font-size: 17px; padding: 10px 16px; }

/* ---------- Empty states + search ---------- */
.empty-state { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; max-width: 720px; }
.empty-state.card { padding: clamp(24px, 4vw, 40px); }
.search-form { width: 100%; }
.search-form input[type=search] { min-width: 0; }
.search-form .btn { flex-shrink: 0; padding-left: 22px; padding-right: 22px; }
@media (max-width: 420px) {
	.search-form__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
	.search-form .btn { padding-left: 16px; padding-right: 16px; }
}
.notice-404 { padding-top: 48px; padding-bottom: 72px; }
.notice-404 .lede { max-width: 620px; }

/* ---------- Single post ---------- */
.article-top { padding-top: 24px; }
.article-head h1 { overflow-wrap: break-word; }
.article-head .pill:hover { color: var(--green-darker); background: #dcebc6; }
.article-hero { background: var(--sand-2); }
/* The old Elementor kit was built for a dark site (white headings, #CDC8C8 text): repoint its global colors for our light page. */
.article-body--builder.article-body--builder { overflow-wrap: break-word; color: var(--ink); font-family: var(--font-body); --e-global-color-primary: var(--ink); --e-global-color-text: var(--ink-2); --e-global-color-accent: var(--green-deep); }
.article-body--builder.article-body--builder a { color: var(--green-deep); }
.article-body--builder img { max-width: 100%; height: auto; }
/* …and its type scale (70px Switzer headings, 16px Manrope text): bring it in line with .prose. */
.article .article-body--builder :is(h1, h2, h3, h4, h5, h6) { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.03em; line-height: 1.12; color: var(--ink); }
.article .article-body--builder h1, .article .article-body--builder h2 { font-size: clamp(28px, 3vw, 36px); }
.article .article-body--builder h3 { font-size: 24px; font-weight: 700; }
.article .article-body--builder :is(h4, h5, h6) { font-size: 20px; font-weight: 700; }
.article .article-body--builder :is(p, li, .elementor-widget-text-editor) { font-family: var(--font-body); font-size: 19px; line-height: 1.7; }
.article .article-body--builder .elementor-widget-text-editor > * + *, .article .article-body--builder .elementor-widget-container > p + p { margin-top: 1em; }
.article .article-body--builder .elementor-widget-text-editor a { color: var(--green-deep); text-decoration: underline; text-decoration-color: var(--green); text-underline-offset: 3px; }
.article-foot { padding-top: 24px; }
.article-tags { padding: 32px 0 0; gap: 10px; }
.author-box { align-items: flex-start; }
.author-box__avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--green); color: var(--black-ish); font: 800 28px/1 var(--font-display); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.author-box__copy { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.author-box__copy strong { font-family: var(--font-display); font-size: 22px; letter-spacing: -0.02em; }
.author-box__copy p { color: var(--muted); font-size: 16px; }
.author-box .link-arrow { min-height: 40px; }
@media (max-width: 520px) { .author-box { flex-direction: column; } }

/* ---------- AI Index ---------- */
.ai-index-intro { align-items: flex-start; gap: 40px 56px; }
.ai-index-intro > .stack { flex: 1.4 1 440px; gap: 20px; }
.ai-index-intro .lede { max-width: 640px; }
.ai-index-how { flex: 1 1 320px; }
.ai-index-how .link-arrow { font-size: 16px; }
.answer-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.answer-list a { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 18px 22px; color: var(--ink); font-weight: 600; transition: transform .15s, box-shadow .15s; }
.answer-list a:hover { transform: translateY(-1px); box-shadow: var(--shadow); color: var(--ink); }
.answer-list a svg { color: var(--green-deep); }
.answer-list__title { min-width: 0; overflow-wrap: break-word; }

/* ---------- AI Visibility Tool ---------- */
.tool-hero__grid { align-items: flex-start; gap: 40px 56px; }
.tool-hero__grid > .stack { flex: 1.4 1 440px; gap: 22px; }
.tool-hero__checks { flex: 1 1 320px; }
.tool-wrap { min-width: 0; }
/* The plugin's tool is a dark card: frame it in dark rather than white. */
.tool-wrap--aivt { background: #141414; border-color: transparent; padding: clamp(12px, 3vw, 32px); overflow: hidden; }
.tool-fallback { align-items: center; text-align: center; }
.tool-fallback p { max-width: 520px; }
.tool-again { padding-top: 16px; }
/* Saved report pages: the plugin's report-page.css paints the whole page dark; keep the theme's page. */
html body.single-cim_aivt_report { background: var(--bg) !important; color: var(--ink) !important; }
html body.single-cim_aivt_report main { background: transparent !important; padding: 0 !important; }

/* Blog post layout: article column + sticky sidebar (contents, free AI scan, discovery call). */
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; }
.article-layout .article-body { max-width: none; margin: 0; }
.article-main { min-width: 0; }
.article-main .article-hero { margin-bottom: 40px; }
.prose h2[id] { scroll-margin-top: 24px; }
.author-box__avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.author-box__avatar:has(img) { background: var(--white); }

.side-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.side-card h2 { font-size: 22px; line-height: 1.2; letter-spacing: -0.02em; }
.side-card p { color: var(--muted); font-size: 16px; line-height: 1.55; }
.side-card .btn { align-self: flex-start; margin-top: 6px; }
.side-card--book { background: var(--green-forest); border-color: var(--green-forest); color: var(--bg); }
.side-card--book .kicker { color: var(--green); }
.side-card--book h2 { color: var(--white); }
.side-card--book p { color: rgba(255, 255, 255, .78); }
.article-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 20px; }
.article-side__seg--toc { display: none; }

.toc__list { list-style: none; margin: 0; padding: 0; counter-reset: toc; display: flex; flex-direction: column; }
.toc__list li { counter-increment: toc; }
.toc__list a { display: grid; grid-template-columns: 26px 1fr; gap: 4px; padding: 8px 0; font-size: 15px; line-height: 1.4; color: var(--muted); text-decoration: none; border-top: 1px solid var(--line); }
.toc__list li:first-child a { border-top: 0; }
.toc__list a::before { content: counter(toc, decimal-leading-zero); font-weight: 700; font-size: 13px; color: var(--muted-2); padding-top: 1px; }
.toc__list a:hover, .toc__list a.is-active { color: var(--ink); }
.toc__list a.is-active::before { color: var(--green-deep); }
.toc--side .toc__list { min-height: 0; overflow-y: auto; margin-right: -8px; padding-right: 8px; overscroll-behavior: contain; }

/* Phones and tablets: contents as a dropdown above the article; the cards follow it. */
.toc--inline { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 32px; }
.toc--inline summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; font-weight: 700; min-height: 44px; }
.toc--inline summary::-webkit-details-marker { display: none; }
.toc--inline summary svg { transition: transform .2s; flex-shrink: 0; }
.toc--inline[open] summary svg { transform: rotate(180deg); }
.toc--inline .toc__list { padding: 0 20px 12px; }
.toc--side { display: none; }
@media (min-width: 1100px) {
	.article-layout { grid-template-columns: minmax(0, 1fr) 320px; gap: 64px; align-items: start; }
	/* The sidebar runs the full height of the article in three stretches (20% / 40% / 40%); each card is
	   sticky inside its own stretch, so the next card pushes the last one up as the reader moves on. */
	.article-side { display: flex; flex-direction: column; gap: 0; align-self: stretch; padding-top: 8px; }
	.article-side__seg, .article-side__seg--toc { display: block; flex: 4 1 0; min-height: 0; padding-bottom: 24px; }
	.article-side__seg--toc { flex-grow: 2; }
	/* Floats about a third of the way down; main.js lowers --stick when a card would not fit below that. */
	.article-side__seg > .side-card { position: sticky; top: var(--stick, 33vh); }
	.article-side__seg > .toc--side { max-height: calc(100vh - 48px); }
	.toc--inline { display: none; }
	.toc--side { display: flex; }
}

/* Share links under blog posts (plain links, no social scripts). */
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 32px; }
.share__link { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 16px; border-radius: 999px; background: var(--white); border: 1px solid var(--line); color: var(--ink); font-size: 15px; font-weight: 600; text-decoration: none; transition: border-color .15s, color .15s; }
.share__link:hover { border-color: var(--green-deep); color: var(--green-deep); }
.share__link svg { flex-shrink: 0; }
