/* Blog index, articles, top lists and author pages.
   Ported from components/BlogPage.tsx, ArticlePage.tsx, ListiclePage.tsx and app/authors/**.
   The old article styles asked for Lora, but the live site never loaded it, so body text is Inter as it was there. */

/* ── Shared ─────────────────────────────────────────────────────── */
.pb-pattern {
	position: absolute; inset: 0; overflow: hidden; border-radius: inherit; pointer-events: none;
	background-image:
		repeating-linear-gradient(60deg, oklch(72% 0.19 var(--pb-hue, 52) / 0.04) 0 1px, transparent 1px 28px),
		repeating-linear-gradient(-60deg, oklch(72% 0.19 var(--pb-hue, 52) / 0.04) 0 1px, transparent 1px 28px);
}
.pb-pattern::after { content: ""; position: absolute; bottom: -40px; right: -40px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, oklch(72% 0.19 var(--pb-hue, 52) / 0.12) 0%, transparent 70%); }
.pb-hue-chip { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 100px; background: oklch(72% 0.19 var(--pb-hue, 52) / 0.18); color: oklch(72% 0.19 var(--pb-hue, 52)); text-transform: uppercase; letter-spacing: 0.06em; }
.pb-hue-chip--plain { background: rgba(255,255,255,0.08); color: var(--text2); }
.pb-hue-initials { display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-family: var(--font-space); font-weight: 700; color: oklch(72% 0.19 var(--pb-hue, 52)); }
.pb-hue-initials--32 { width: 32px; height: 32px; border-radius: 9px; font-size: 11px; background: oklch(72% 0.19 var(--pb-hue, 52) / 0.18); border: 1px solid oklch(72% 0.19 var(--pb-hue, 52) / 0.4); }
.pb-hue-initials--26 { width: 26px; height: 26px; border-radius: 7px; font-size: 9px; background: oklch(72% 0.19 var(--pb-hue, 52) / 0.15); border: 1px solid oklch(72% 0.19 var(--pb-hue, 52) / 0.35); }

/* Round avatar: initials underneath, Gravatar on top when one exists. */
.pb-avatar { position: relative; flex-shrink: 0; border-radius: 50%; overflow: hidden; display: flex; align-items: center; justify-content: center; background: var(--accent-dim); border: 1px solid var(--accent); color: var(--accent); font-weight: 700; }
.pb-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pb-avatar--36 { width: 36px; height: 36px; font-size: 14px; }
.pb-avatar--64 { width: 64px; height: 64px; font-size: 18px; border: 0; }
.pb-avatar--96 { width: 96px; height: 96px; font-size: 28px; border: 0; }

.pb-pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border); }
.pb-pagination__prev { padding: 8px 18px; border-radius: 9px; border: 1px solid var(--border2); color: var(--text2); text-decoration: none; font-size: 13px; font-weight: 500; }
.pb-pagination__next { padding: 8px 18px; border-radius: 9px; background: var(--accent); color: #000; text-decoration: none; font-size: 13px; font-weight: 700; }
.pb-pagination__status { font-size: 13px; color: var(--text3); padding: 0 8px; }

/* ── Blog index ─────────────────────────────────────────────────── */
.pb-eyebrow { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; color: var(--accent); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; }
.pb-blog-head__note { margin: 8px 0 0; font-size: 14px; color: var(--accent); }

.pb-blog-tabs { display: flex; gap: 4px; padding: 20px 0; margin-bottom: 48px; overflow-x: auto; border-bottom: 1px solid var(--border); scrollbar-width: none; }
.pb-blog-tab { padding: 7px 18px; border-radius: 100px; border: 1px solid var(--border); font-size: 13px; font-weight: 500; color: var(--text2); text-decoration: none; white-space: nowrap; transition: all 0.15s; }
.pb-blog-tab:hover { border-color: var(--border2); color: var(--text); }
.pb-blog-tab.is-active { background: var(--accent); border-color: var(--accent); color: #000; }

.pb-featured-post { position: relative; display: block; min-height: 340px; margin-bottom: 48px; padding: 40px 44px; overflow: hidden; background: var(--bg2); border: 1px solid var(--border2); border-radius: 20px; text-decoration: none; transition: border-color 0.2s, transform 0.2s; }
.pb-featured-post:hover { border-color: oklch(72% 0.19 var(--pb-hue, 52)); transform: translateY(-2px); }
.pb-featured-post__inner { position: relative; }
.pb-featured-post__chips { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.pb-featured-post__title { max-width: 680px; margin-bottom: 16px; font-family: var(--font-space); font-size: 34px; font-weight: 700; letter-spacing: -0.04em; line-height: 1.15; color: var(--text); }
.pb-featured-post__excerpt { max-width: 600px; margin: 0 0 28px; font-size: 16px; line-height: 1.7; color: var(--text2); }
.pb-featured-post__meta { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.pb-featured-post__author { display: flex; align-items: center; gap: 10px; }
.pb-featured-post__author > span:last-child { display: flex; flex-direction: column; }
.pb-featured-post__name { font-size: 13px; font-weight: 600; color: var(--text); }
.pb-featured-post__date { font-size: 12px; color: var(--text3); }
.pb-featured-post__read { display: flex; align-items: center; gap: 5px; font-size: 13px; color: var(--text3); }

.pb-post-card { position: relative; display: flex; flex-direction: column; overflow: hidden; background: var(--bg2); border: 1px solid var(--border); border-radius: 16px; text-decoration: none; transition: all 0.2s; }
.pb-post-card:hover { border-color: var(--border2); transform: translateY(-2px); }
.pb-post-card__cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pb-post-card__body { display: flex; flex-direction: column; flex: 1; padding: 18px 20px 16px; }
.pb-post-card__foot > span:last-child { display: flex; flex-direction: column; }

.pb-blog-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; padding-bottom: 80px; }
.pb-blog-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.pb-blog-grid-2.is-single { grid-template-columns: minmax(0, 1fr); }
.pb-blog-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
[data-pb-blog-card][hidden], [data-pb-blog-featured][hidden] { display: none; }
.pb-blog-empty { padding: 60px 0; margin: 0; text-align: center; font-size: 15px; color: var(--text3); }

.pb-post-card__cover { position: relative; flex-shrink: 0; height: 140px; overflow: hidden; background: var(--bg3); }
.pb-post-card--large .pb-post-card__cover { height: 180px; }
.pb-post-card__chips { position: absolute; top: 14px; left: 14px; right: 14px; z-index: 1; display: flex; flex-wrap: wrap; gap: 6px; }
.pb-post-card__chip { background: oklch(72% 0.19 var(--pb-hue, 52) / 0.22); letter-spacing: 0.07em; }
.pb-post-card__type { padding: 3px 9px; border-radius: 100px; background: rgba(0,0,0,0.55); border: 1px solid var(--border2); font-size: 11px; font-weight: 600; color: var(--text); }

/* Blog hero (homepage style) and search results line. */
.pb-blog-hero { margin-bottom: 8px; }
.pb-hero.pb-blog-hero .pb-hero__sub { margin-bottom: 36px; }
.pb-blog-hero .pb-hero__search { margin-bottom: 28px; }
.pb-blog-hero .pb-hero__chips { margin-bottom: 40px; }
.pb-blog-results { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; margin: 0 0 24px; font-size: 15px; color: var(--text2); }
.pb-blog-results a { font-size: 14px; color: var(--accent); text-decoration: none; }
.pb-blog-results a:hover { text-decoration: underline; }
.pb-post-card--large .pb-post-card__body { padding: 24px 24px 20px; }
.pb-post-card__title { flex: 1; margin-bottom: 10px; font-family: var(--font-space); font-size: 16px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.3; color: var(--text); }
.pb-post-card--large .pb-post-card__title { font-size: 20px; }
.pb-post-card__excerpt { margin: 0 0 14px; font-size: 14px; line-height: 1.65; color: var(--text2); }
.pb-post-card__foot { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border); }
.pb-post-card__author { font-size: 12px; font-weight: 500; color: var(--text2); }
.pb-post-card__meta { font-size: 11px; color: var(--text3); }

.pb-blog-side { display: flex; flex-direction: column; gap: 16px; }
.pb-blog-box { padding: 20px; background: var(--bg2); border: 1px solid var(--border); border-radius: 16px; }
.pb-blog-box .pb-label { margin-bottom: 16px; }
.pb-blog-newsletter { padding: 24px; scroll-margin-top: calc(var(--nav-h) + 24px); }
.pb-blog-newsletter__head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.pb-blog-newsletter__icon { width: 32px; height: 32px; flex-shrink: 0; border-radius: 9px; display: flex; align-items: center; justify-content: center; background: var(--accent-dim); border: 1px solid var(--accent); color: var(--accent); }
.pb-blog-newsletter__title { font-family: var(--font-space); font-size: 14px; font-weight: 700; }
.pb-blog-newsletter__sub { font-size: 12px; color: var(--text3); }
.pb-blog-newsletter__form { position: relative; display: flex; flex-direction: column; gap: 8px; }
.pb-blog-newsletter__form input[type="email"] { padding: 9px 12px; border-radius: 8px; background: rgba(255,255,255,0.05); border: 1px solid var(--border2); color: var(--text); font: 13px var(--font-inter); outline: none; }
.pb-blog-newsletter__form input[type="email"]:focus { border-color: var(--accent); }
.pb-blog-newsletter__form button { padding: 9px; border: 0; border-radius: 8px; background: var(--accent); color: #000; font: 700 13px var(--font-inter); cursor: pointer; }
.pb-blog-newsletter__form button:hover { opacity: 0.88; }
.pb-blog-newsletter__done { margin: 0; font-size: 13px; font-weight: 600; color: var(--green); }
.pb-blog-newsletter__error { margin: 0; font-size: 12px; color: var(--red); }

.pb-blog-latest { list-style: none; margin: 0; padding: 0; }
.pb-blog-latest li + li { border-top: 1px solid var(--border); }
.pb-blog-latest a { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; text-decoration: none; transition: opacity 0.15s; }
.pb-blog-latest a:hover { opacity: 0.7; }
.pb-blog-latest li:first-child a { padding-top: 0; }
.pb-blog-latest li:last-child a { padding-bottom: 0; }
.pb-blog-latest__num { width: 28px; flex-shrink: 0; font-family: var(--font-space); font-size: 22px; font-weight: 700; letter-spacing: -0.04em; line-height: 1; color: var(--border2); }
.pb-blog-latest a > span:last-child { display: flex; flex-direction: column; gap: 4px; }
.pb-blog-latest__title { font-size: 13px; font-weight: 600; line-height: 1.4; color: var(--text); }
.pb-blog-latest__meta { font-size: 11px; color: var(--text3); }
.pb-blog-topics { display: flex; flex-wrap: wrap; gap: 7px; }
.pb-blog-topics a { padding: 5px 12px; border-radius: 100px; border: 1px solid var(--border); font-size: 12px; font-weight: 500; color: var(--text3); text-decoration: none; transition: all 0.15s; }
.pb-blog-topics a:hover { border-color: var(--border2); color: var(--text2); }

/* ── Article ────────────────────────────────────────────────────── */
.pb-progress { position: fixed; top: 0; left: 0; right: 0; z-index: 60; height: 3px; background: var(--bg3); }
.admin-bar .pb-progress { top: 32px; }
.pb-progress__bar { height: 100%; width: 0; background: var(--accent); }

.pb-article { padding-top: var(--nav-h); }
.pb-crumbs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; font-size: 14px; color: var(--text3); }
.pb-crumbs a { color: var(--text3); text-decoration: none; }
.pb-crumbs a:hover { text-decoration: underline; }
.pb-crumbs__current { color: var(--text2); }
/* The old badge's tinted background never rendered (invalid colour), so it is text only. */
.pb-cat-badge { display: inline-block; margin-bottom: 20px; padding: 4px 12px; border-radius: 100px; font-size: 12px; font-weight: 600; color: var(--pb-cat, var(--text3)); text-decoration: none; }

/* Editor content. Blocks from the post editor, styled like the old body blocks. */
.pb-article-body { font-family: var(--font-inter); color: var(--text2); }
.pb-article-body > :first-child { margin-top: 0; }
.pb-article-body p { margin: 0 0 20px; font-size: 17px; line-height: 1.8; }
.pb-article-body h2 { margin: 40px 0 16px; font-family: var(--font-space); font-size: 24px; font-weight: 700; line-height: 1.33; color: var(--text); scroll-margin-top: 112px; }
.pb-article-body > h2:first-child { margin-top: 40px; }
.pb-article-body h3 { margin: 28px 0 12px; font-family: var(--font-space); font-size: 18px; font-weight: 600; color: var(--text); }
.pb-article-body strong { color: var(--text); }
.pb-article-body a { color: var(--accent); text-underline-offset: 2px; }
.pb-article-body a:hover { opacity: 0.8; }
.pb-article-body ul, .pb-article-body ol { margin: 0 0 20px; padding-left: 26px; font-size: 17px; }
.pb-article-body li { margin-bottom: 6px; line-height: 1.75; }
.pb-article-body hr { margin: 2em 0; border: 0; border-top: 1px solid var(--border); }
.pb-article-body img { max-width: 100%; height: auto; border-radius: 10px; }
.pb-article-body figure { margin: 24px 0; }
.pb-article-body code { padding: 1px 5px; border-radius: 4px; background: rgba(255,255,255,0.07); border: 1px solid var(--border2); font: 0.85em "Courier New", monospace; color: var(--accent2); }
.pb-article-body pre { margin: 24px 0; padding: 20px; overflow-x: auto; border-radius: 10px; background: rgba(255,255,255,0.04); border: 1px solid var(--border2); }
.pb-article-body pre code { padding: 0; background: none; border: 0; font-size: 13px; color: var(--text2); }

/* Quote block = the old pull quote. */
.pb-article-body blockquote { margin: 32px 0; padding: 4px 0 4px 24px; border-left: 3px solid var(--accent); }
.pb-article-body blockquote p { margin: 0; font-size: 20px; line-height: 1.7; font-weight: 500; font-style: italic; color: var(--text); }
.pb-article-body blockquote cite { display: block; margin-top: 8px; font-size: 14px; font-style: normal; color: var(--text3); }

/* Table block. */
.pb-article-body .wp-block-table { margin: 24px 0; overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; }
.pb-article-body .wp-block-group__inner-container { display: contents; }
.pb-article-body .wp-block-table thead { border: 0; }
.pb-article-body .wp-block-table th, .pb-article-body .wp-block-table td { border: 0; }
.pb-article-body table { width: 100%; table-layout: auto; border-collapse: collapse; font-family: var(--font-inter); font-size: 14px; }
.pb-article-body th { padding: 12px 16px; background: var(--bg3); border-bottom: 1px solid var(--border); font-family: var(--font-space); font-weight: 600; text-align: left; color: var(--text); }
.pb-article-body td { padding: 12px 16px; color: var(--text2); }
.pb-article-body tbody tr + tr td { border-top: 1px solid var(--border); }
.pb-article-body td:first-child { color: var(--text); }
.pb-article-body figcaption { margin-top: 8px; font-size: 13px; color: var(--text3); }
.pb-article-body .wp-block-table figcaption { padding: 0 16px 12px; }

/* Group with class "pb-callout pb-callout--info|tip|warning": bold first line is the title. */
.pb-article-body .pb-callout { position: relative; margin: 24px 0; padding: 20px 20px 20px 54px; border-radius: 12px; background: var(--accent2-dim); border: 1px solid var(--accent2); --pb-callout: var(--accent2); }
.pb-article-body .pb-callout::before { content: "ℹ"; position: absolute; left: 20px; top: 18px; font-size: 18px; line-height: 1.5; color: var(--pb-callout); font-family: var(--font-inter); }
.pb-article-body .pb-callout--tip { background: var(--accent-dim); border-color: var(--accent); --pb-callout: var(--accent); }
.pb-article-body .pb-callout--tip::before { content: "✦"; }
.pb-article-body .pb-callout--warning { background: var(--red-dim); border-color: var(--red); --pb-callout: var(--red); }
.pb-article-body .pb-callout--warning::before { content: "⚠"; }
.pb-article-body .pb-callout p { margin: 0; font-size: 14px; line-height: 1.625; }
.pb-article-body .pb-callout p:first-child { margin-bottom: 4px; }
.pb-article-body .pb-callout p:first-child strong:only-child { font-family: var(--font-space); font-weight: 600; }

/* List with class "pb-datapoints": "<strong>35%</strong> label" per item. */
.pb-article-body .pb-datapoints { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 24px 0; padding: 0; list-style: none; }
.pb-article-body .pb-datapoints li { margin: 0; padding: 16px; display: flex; flex-direction: column; gap: 4px; text-align: center; background: var(--bg3); border: 1px solid var(--border); border-radius: 12px; font-family: var(--font-inter); font-size: 12px; line-height: 1.33; color: var(--text3); }
.pb-article-body .pb-datapoints strong { font-family: var(--font-space); font-size: 24px; font-weight: 700; line-height: 1.33; color: var(--accent); }
@media (max-width: 639px) { .pb-article-body .pb-datapoints { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Group with class "pb-toolcta": bold name, one line of text, then the link as a button. */
.pb-article-body .pb-toolcta { margin: 32px 0; padding: 24px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 16px; row-gap: 2px; border-radius: 12px; background: var(--accent-dim); border: 1px solid var(--accent); }
.pb-article-body .pb-toolcta p { grid-column: 1; margin: 0; font-family: var(--font-inter); font-size: 14px; line-height: 1.43; }
.pb-article-body .pb-toolcta p:first-child strong { font-family: var(--font-space); font-weight: 700; }
.pb-article-body .pb-toolcta p:has(> a:only-child) { grid-column: 2; grid-row: 1 / span 2; }
.pb-article-body .pb-toolcta a { display: inline-block; padding: 10px 20px; border-radius: 8px; background: var(--accent); color: #000; font-weight: 600; text-decoration: none; white-space: nowrap; }
.pb-article-body .pb-toolcta a:hover { opacity: 0.85; }
@media (max-width: 639px) {
	.pb-article-body .pb-toolcta { grid-template-columns: minmax(0, 1fr); row-gap: 4px; }
	.pb-article-body .pb-toolcta p:has(> a:only-child) { grid-column: 1; grid-row: auto; margin-top: 12px; }
}

/* ── Top list ───────────────────────────────────────────────────── */

/* ── Authors ────────────────────────────────────────────────────── */
.pb-authors { max-width: 768px; margin: 0 auto; padding: calc(var(--nav-h) + 64px) 16px 64px; }
.pb-authors__title { margin-bottom: 8px; font-size: 30px; font-weight: 700; line-height: 1.2; }
.pb-authors__intro { margin-bottom: 40px; color: var(--text2); }
.pb-authors__intro p { margin: 0 0 12px; }
.pb-authors__list { display: flex; flex-direction: column; gap: 16px; }
.pb-author-row { display: flex; align-items: center; gap: 20px; padding: 20px; border: 1px solid var(--border); border-radius: 12px; text-decoration: none; transition: border-color 0.15s; }
.pb-author-row:hover, .pb-author-post:hover { border-color: var(--accent); }
.pb-author-row__text { min-width: 0; }
.pb-author-row__text p { margin: 0; }
.pb-author-row__name { font-weight: 600; color: var(--text); }
.pb-author-row__role { margin-bottom: 4px !important; font-size: 14px; color: var(--accent); }
.pb-author-row__bio, .pb-author-post__excerpt { font-size: 14px; color: var(--text2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.pb-author-profile { display: flex; align-items: flex-start; gap: 24px; margin-bottom: 48px; padding-bottom: 48px; border-bottom: 1px solid var(--border); }
.pb-author-profile .pb-authors__title { margin-bottom: 4px; }
.pb-author-profile__role { margin: 0 0 16px; font-weight: 500; color: var(--accent); }
.pb-author-profile__bio { margin: 0; line-height: 1.625; color: var(--text2); }
.pb-author-posts__title { margin-bottom: 24px; font-size: 20px; font-weight: 700; }
.pb-author-posts__title span { margin-left: 8px; font-size: 16px; font-weight: 400; color: var(--text2); }
.pb-author-post { display: block; padding: 20px; border: 1px solid var(--border); border-radius: 12px; text-decoration: none; transition: border-color 0.15s; }
.pb-author-post__chips { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.pb-author-post__cat { padding: 2px 8px; border-radius: 100px; background: var(--accent-dim); color: var(--accent); font-size: 12px; font-weight: 600; }
.pb-author-post__title { margin-bottom: 4px; font-size: 16px; font-weight: 600; line-height: 1.375; color: var(--text); }
.pb-author-post__excerpt { margin: 0; }
.pb-author-post__muted { margin: 0; font-size: 12px; color: var(--text2); }
.pb-author-post__date { margin-top: 8px; }

/* ── Responsive (old breakpoints) ───────────────────────────────── */
@media (max-width: 1024px) {
	.pb-blog-layout { grid-template-columns: minmax(0, 1fr); }
	.pb-blog-side { display: none; }
}
@media (max-width: 768px) {
	.pb-featured-post { padding: 24px 20px; min-height: 0; }
	.pb-featured-post__title { font-size: 22px; }
	.pb-blog-grid-2, .pb-blog-grid-3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 782px) {
	.admin-bar .pb-progress { top: 46px; }
}
