/* ==========================================================================
   Blog article: blog-details.php
   Uses tokens, .pg-wrap and .pg-i from nav.css; the article text itself is
   styled only by prose.css. No boxed cards, no max-width on text.
   Intro: a soft blush band with meta, a full-width title, the summary and a
   byline. Body: the 16:9 picture then the article on the left (the column
   starts level with the picture), a sticky column on the right (share, contents, help, topics,
   resources). Previous / next under the article; "More in <category>" before
   the footer.
   ========================================================================== */

.pg-bd { display: block; font-family: var(--pg-font); color: var(--pg-ink); }
.pg-bd a { text-decoration: none; transition: color .2s, background-color .2s, border-color .2s; }
.pg-bd a:focus-visible, .pg-bd button:focus-visible, .pg-bd summary:focus-visible { outline: 2px solid var(--pg-pink); outline-offset: 3px; border-radius: 6px; }
.pg-bd ul, .pg-bd ol { margin: 0; padding: 0; list-style: none; }
.pg-bd li { margin: 0; }

/* Reading progress under the sticky header */
.pg-bd__progress { position: fixed; left: 0; right: 0; top: var(--pg-bar-h); z-index: 998; height: 3px; pointer-events: none; }
.pg-bd__progress span { display: block; width: 100%; height: 100%; background: linear-gradient(90deg, var(--pg-plum), var(--pg-pink)); transform: scaleX(0); transform-origin: left; }

.pg-bd__kicker {
	display: flex; align-items: center; gap: 10px; margin: 0 0 10px;
	font-size: 12.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--pg-pink);
}
.pg-bd__kicker::before { content: ""; width: 22px; height: 2px; background: currentColor; }
.pg-bd__aside-title, .pg-bd__toc summary {
	display: flex; align-items: center; gap: 9px; margin: 0 0 10px;
	font-size: 12.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--pg-pink);
}

/* --------------------------------------------------------------------------
   Intro band and 16:9 picture
   -------------------------------------------------------------------------- */
.pg-bd__hero {
	padding: 26px 0 40px;
	background:
		radial-gradient(640px 320px at 100% 0%, rgba(230, 8, 127, .12), transparent 65%),
		radial-gradient(560px 320px at 0% 100%, rgba(122, 104, 214, .14), transparent 65%),
		linear-gradient(180deg, #fbeff6 0%, #f4f1fc 100%);
}
.pg-bd__crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 26px; font-size: 13.5px; color: var(--pg-muted); }
.pg-bd__crumbs a { color: var(--pg-muted); }
.pg-bd__crumbs a:hover { color: var(--pg-pink); }
.pg-bd__crumbs .pg-i { width: 14px; height: 14px; opacity: .6; }
.pg-bd__crumbs span { color: var(--pg-ink); font-weight: 500; }

.pg-bd__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 0 0 16px; font-size: 14px; color: var(--pg-muted); }
.pg-bd__meta > * + *::before { content: ""; display: inline-block; width: 4px; height: 4px; margin-right: 18px; border-radius: 50%; background: #cfcae3; vertical-align: middle; }
.pg-bd__tag { padding: 5px 14px; border-radius: 999px; background: var(--pg-pink); color: #fff; font-size: 12.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.pg-bd__meta > .pg-bd__tag + *::before { display: none; }

.pg-bd__title {
	margin: 0 0 18px;
	font: 600 clamp(32px, 3.6vw, 56px)/1.1 var(--pg-font);
	letter-spacing: -.02em; color: var(--pg-ink); text-transform: none;
}
.pg-bd__lede { margin: 0; font-size: 18px; line-height: 1.65; color: var(--pg-muted); }

.pg-bd__byline { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 32px; margin-top: 24px; padding-top: 20px; border-top: 1px solid rgba(59, 50, 132, .12); }
.pg-bd__byline > span:not(.pg-bd__avatar), .pg-bd__byline > img + span { display: flex; flex-direction: column; gap: 2px; font-size: 15px; }
.pg-bd__byline small { font-size: 12px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--pg-muted); }
.pg-bd__byline b { font-weight: 600; color: var(--pg-ink); }
.pg-bd__avatar {
	display: grid; place-items: center; width: 46px; height: 46px; margin-right: -18px; border-radius: 50%;
	background: linear-gradient(135deg, var(--pg-plum), var(--pg-pink)); color: #fff; font-size: 18px; font-weight: 700;
}
img.pg-bd__avatar { object-fit: cover; object-position: top; background: var(--pg-lilac); }
.pg-bd__byline b a { color: inherit; text-decoration: underline; text-decoration-color: rgba(230, 8, 127, .35); text-underline-offset: 3px; }
.pg-bd__byline b a:hover { color: var(--pg-pink); }

.pg-bd__figure { position: relative; margin: 0 0 36px; }
.pg-bd__frame {
	position: relative; display: grid; place-items: center; overflow: hidden; aspect-ratio: 16 / 9;
	border-radius: 22px; background: var(--pg-lilac); color: var(--pg-pink);
	box-shadow: 0 30px 60px -38px rgba(42, 35, 99, .55);
}
.pg-bd__frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pg-bd__frame-icon .pg-i { width: 96px; height: 96px; stroke-width: 1.2; }

/* --------------------------------------------------------------------------
   Body: article left, sticky column right
   -------------------------------------------------------------------------- */
.pg-bd__body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(36px, 5vw, 80px); align-items: start; padding-top: 44px; padding-bottom: 64px; }
.pg-bd__article { width: 100%; min-width: 0; }

.pg-bd__aside { position: sticky; top: calc(var(--pg-bar-h) + 24px); display: flex; flex-direction: column; gap: 30px; padding-left: 32px; border-left: 1px solid var(--pg-line); }

/* Share */
.pg-bd__share-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pg-bd__share-row a, .pg-bd__share-row button {
	display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-width: 42px; height: 42px; padding: 0 12px;
	border: 1px solid #ddd8ee; border-radius: 999px; background: #fff; color: var(--pg-plum);
	font: 500 14px/1 var(--pg-font); cursor: pointer; transition: border-color .2s, color .2s, background-color .2s;
}
.pg-bd__share-row .pg-i { width: 17px; height: 17px; }
.pg-bd__share-row a:hover, .pg-bd__share-row button:hover { border-color: var(--pg-pink); color: var(--pg-pink); }
.pg-bd__share-row button.is-done { border-color: #1fa855; background: #e8f8ee; color: #0f6b38; }

/* In this article */
.pg-bd__toc summary { list-style: none; cursor: pointer; }
.pg-bd__toc summary::-webkit-details-marker { display: none; }
.pg-bd__toc summary span { margin-left: auto; padding: 2px 8px; border-radius: 999px; background: var(--pg-lilac); font-size: 11.5px; letter-spacing: 0; color: var(--pg-plum); }
.pg-bd__toc a { display: flex; gap: 10px; padding: 7px 0; font-size: 14.5px; line-height: 1.4; color: var(--pg-muted); }
.pg-bd__toc a span { flex: none; min-width: 20px; padding-top: 2px; font-size: 12px; font-weight: 700; color: #b8b3d1; }
.pg-bd__toc a:hover { color: var(--pg-plum); }
.pg-bd__toc a.is-active { color: var(--pg-ink); font-weight: 500; }
.pg-bd__toc a.is-active span { color: var(--pg-pink); }

/* Help */
.pg-bd__help { padding: 22px 0; border-top: 1px solid var(--pg-line); border-bottom: 1px solid var(--pg-line); }
.pg-bd__help-title { margin: 0 0 6px; font: 600 20px/1.3 var(--pg-font); color: var(--pg-ink); }
.pg-bd__help > p:not(.pg-bd__help-title) { margin: 0 0 16px; font-size: 14.5px; line-height: 1.6; color: var(--pg-muted); }
.pg-bd__btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; padding: 0 20px;
	border-radius: 999px; font-size: 15px; font-weight: 500; white-space: nowrap;
}
.pg-bd__btn .pg-i { width: 18px; height: 18px; }
.pg-bd__btn--primary { background: var(--pg-pink); color: #fff !important; box-shadow: 0 10px 22px -12px rgba(230, 8, 127, .8); }
.pg-bd__btn--primary:hover { background: var(--pg-pink-deep); }
.pg-bd__help-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.pg-bd__help-row a {
	display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px;
	border: 1px solid #ddd8ee; border-radius: 999px; font-size: 14.5px; font-weight: 500; color: var(--pg-ink);
}
.pg-bd__help-row a .pg-i { width: 17px; height: 17px; color: var(--pg-pink); }
.pg-bd__help-row a.is-wa .pg-i { color: #1fa855; }
.pg-bd__help-row a:hover { border-color: var(--pg-plum); }

/* Topics */
.pg-bd__topics ul { display: flex; flex-wrap: wrap; gap: 8px; }
.pg-bd__topics a {
	display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px;
	border: 1px solid #ddd8ee; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--pg-ink);
}
.pg-bd__topics small { font-size: 12px; font-weight: 600; color: var(--pg-muted); }
.pg-bd__topics a:hover { border-color: var(--pg-pink); color: var(--pg-pink); }
.pg-bd__topics a[aria-current] { border-color: var(--pg-pink); background: var(--pg-blush); color: var(--pg-pink); }

/* Helpful resources */
.pg-bd__res li { border-bottom: 1px solid var(--pg-line); }
.pg-bd__res li:first-child { border-top: 1px solid var(--pg-line); }
.pg-bd__res a { display: flex; align-items: center; gap: 12px; padding: 12px 0; color: inherit; }
.pg-bd__res-icon { display: inline-grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--pg-blush); color: var(--pg-pink); }
.pg-bd__res-icon .pg-i { width: 18px; height: 18px; }
.pg-bd__res a > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.pg-bd__res small { font-size: 11.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--pg-muted); }
.pg-bd__res b { font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--pg-ink); transition: color .2s; }
.pg-bd__res a:hover b { color: var(--pg-pink); }

/* Questions (rows reuse .pg-faq__item from faq.css) */
.pg-bd__faq { margin-top: 56px; padding-top: 36px; border-top: 1px solid var(--pg-line); scroll-margin-top: calc(var(--pg-bar-h) + 24px); }
.pg-bd__faq h2 { margin: 0 0 14px; font: 600 clamp(23px, 1.4vw + 16px, 30px)/1.25 var(--pg-font); color: var(--pg-ink); text-transform: none; }
.pg-bd__faq .pg-faq__answer.pg-prose { font-size: 16px; }

.pg-bd__note { margin: 40px 0 0; padding-top: 18px; border-top: 1px solid var(--pg-line); font-size: 13.5px; color: var(--pg-muted); }

/* Previous / next */
.pg-bd__pager { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: 30px; border-top: 1px solid var(--pg-line); border-bottom: 1px solid var(--pg-line); }
.pg-bd__pager-link { display: flex; align-items: center; gap: 16px; padding: 22px 24px 22px 0; color: inherit; }
.pg-bd__pager-link--next { flex-direction: row-reverse; text-align: right; padding: 22px 0 22px 24px; border-left: 1px solid var(--pg-line); }
.pg-bd__pager-link.is-empty { border-left: 1px solid var(--pg-line); }
.pg-bd__pager-link.is-empty:first-child { border-left: 0; }
.pg-bd__pager-pic { display: grid; place-items: center; flex: none; width: 128px; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 12px; background: var(--pg-lilac); color: var(--pg-pink); }
.pg-bd__pager-pic img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--pg-ease); }
.pg-bd__pager-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pg-bd__pager-text small { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--pg-pink); }
.pg-bd__pager-link--next .pg-bd__pager-text small { justify-content: flex-end; }
.pg-bd__pager-text small .pg-i { width: 15px; height: 15px; }
.pg-bd__pager-link--prev .pg-bd__pager-text small .pg-i { transform: rotate(180deg); }
.pg-bd__pager-text b { font-size: 17px; font-weight: 600; line-height: 1.35; color: var(--pg-ink); transition: color .2s; }
.pg-bd__pager-link:hover b { color: var(--pg-pink); }
.pg-bd__pager-link:hover .pg-bd__pager-pic img { transform: scale(1.06); }

/* --------------------------------------------------------------------------
   More in this category (before the footer)
   -------------------------------------------------------------------------- */
.pg-bd__more {
	padding: 60px 0 68px;
	background: linear-gradient(180deg, #f6f3fc 0%, #fff 100%);
	border-top: 1px solid var(--pg-line);
}
.pg-bd__more-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.pg-bd__more-head h2 { margin: 0; font: 600 clamp(26px, 2.3vw, 38px)/1.15 var(--pg-font); color: var(--pg-ink); text-transform: none; }
.pg-bd__all { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: var(--pg-plum); }
.pg-bd__all .pg-i { width: 17px; height: 17px; color: var(--pg-pink); transition: transform .3s var(--pg-ease); }
.pg-bd__all:hover { color: var(--pg-pink); }
.pg-bd__all:hover .pg-i { transform: translateX(4px); }

.pg-bd__more-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 30px; }
.pg-bd__post { display: flex; flex-direction: column; gap: 8px; color: inherit; }
.pg-bd__post-pic { display: grid; place-items: center; aspect-ratio: 16 / 9; margin-bottom: 8px; overflow: hidden; border-radius: 18px; background: var(--pg-lilac); color: var(--pg-pink); }
.pg-bd__post-pic img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--pg-ease); }
.pg-bd__post-meta { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--pg-muted); }
.pg-bd__post-meta b { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--pg-pink); }
.pg-bd__post-title { font-size: 20px; font-weight: 600; line-height: 1.3; color: var(--pg-ink); transition: color .25s; }
.pg-bd__post-text { font-size: 15px; line-height: 1.6; color: var(--pg-muted); }
.pg-bd__post-go { display: inline-flex; align-items: center; gap: 8px; margin-top: 2px; font-size: 14.5px; font-weight: 600; color: var(--pg-plum); }
.pg-bd__post-go .pg-i { width: 16px; height: 16px; color: var(--pg-pink); transition: transform .3s var(--pg-ease); }
.pg-bd__post:hover .pg-bd__post-pic img { transform: scale(1.05); }
.pg-bd__post:hover .pg-bd__post-title { color: var(--pg-pink); }
.pg-bd__post:hover .pg-bd__post-go .pg-i { transform: translateX(4px); }
html.pg-lazy-ready .pg-bd img:not(.is-loaded) { background-image: none; }

/* --------------------------------------------------------------------------
   Smaller screens
   -------------------------------------------------------------------------- */
@media (max-width: 1099.98px) {
	.pg-bd__body { grid-template-columns: minmax(0, 1fr) 290px; gap: 40px; }
	.pg-bd__aside { padding-left: 24px; }
	.pg-bd__more-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 899.98px) {
	.pg-bd__hero { padding: 20px 0 30px; }
	.pg-bd__title { font-size: 32px; }
	.pg-bd__lede { font-size: 16.5px; }
	.pg-bd__byline { gap: 12px 22px; }
	.pg-bd__figure { order: -2; margin-bottom: 24px; }
	.pg-bd__frame { border-radius: 16px; }

	.pg-bd__body { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 30px; padding-bottom: 48px; }
	.pg-bd__aside { position: static; display: contents; }
	.pg-bd__toc { order: -1; margin-bottom: 26px; padding: 14px 0; border-top: 1px solid var(--pg-line); border-bottom: 1px solid var(--pg-line); }
	.pg-bd__toc summary { margin: 0; }
	.pg-bd__toc[open] summary { margin-bottom: 10px; }
	.pg-bd__share { order: 2; margin-top: 30px; }
	.pg-bd__help { order: 3; margin-top: 30px; }
	.pg-bd__topics { order: 4; margin-top: 30px; }
	.pg-bd__res { order: 5; margin-top: 30px; }

	.pg-bd__more { padding: 44px 0 48px; }
	.pg-bd__more-head { flex-direction: column; align-items: flex-start; gap: 10px; }
}

@media (max-width: 599.98px) {
	.pg-bd__pager { grid-template-columns: minmax(0, 1fr); }
	.pg-bd__pager-link, .pg-bd__pager-link--next { flex-direction: row; text-align: left; padding: 18px 0; border-left: 0; }
	.pg-bd__pager-link--next { border-top: 1px solid var(--pg-line); }
	.pg-bd__pager-link--next .pg-bd__pager-text small { justify-content: flex-start; }
	.pg-bd__pager-link.is-empty { display: none; }
	.pg-bd__pager-pic { width: 104px; }
	.pg-bd__more-list { grid-template-columns: minmax(0, 1fr); gap: 0; }
	.pg-bd__more-list li { border-bottom: 1px solid var(--pg-line); }
	.pg-bd__post { display: grid; grid-template-columns: 112px 1fr; column-gap: 14px; row-gap: 4px; align-items: start; padding: 16px 0; }
	.pg-bd__post-pic { grid-row: 1 / 5; margin: 0; border-radius: 12px; }
	.pg-bd__post-title { font-size: 16.5px; }
	.pg-bd__post-text { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.pg-bd__post-pic img, .pg-bd__pager-pic img, .pg-bd__all .pg-i, .pg-bd__post-go .pg-i { transition: none; }
}
