/* PollyVox v0.14.2 — sidebar, related heading and footer social repairs. */

/* A content rail should never collapse because a late release stylesheet set
   an accidental width or overflow rule. */
.pv-layout--has-aside {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(250px, var(--pv-sidebar-width, 320px));
	gap: var(--pv-sidebar-gap, 32px);
	align-items: start;
}
.pv-layout--aside-left { grid-template-columns: minmax(250px, var(--pv-sidebar-width, 320px)) minmax(0, 1fr); }
.pv-layout--aside-left .pv-layout__aside { grid-column: 1; grid-row: 1; }
.pv-layout--aside-left .pv-layout__main { grid-column: 2; }
.pv-layout__aside { min-width: 0; width: 100%; visibility: visible; opacity: 1; }
.pv-sidebar-latest,
.pv-layout__aside .widget { width: 100%; }

/* Restore a visible, theme-aware related-section title in every mode. */
.pv-related-posts__head { display: grid; grid-template-columns: minmax(24px, 1fr) auto minmax(24px, 1fr); align-items: center; gap: 14px; }
.pv-related-posts__head h2 {
	display: block;
	margin: 0;
	color: var(--pv-ink) !important;
	-webkit-text-fill-color: currentColor !important;
	background: none !important;
	font-size: clamp(1.15rem, 2vw, 1.55rem);
	line-height: 1.15;
	text-align: center;
	white-space: normal;
}
.pv-related-posts__head > span { display: block; min-width: 24px; height: 2px; background: var(--pv-accent); opacity: .8; }
[data-pv-theme="dark"] .pv-related-posts__head h2 { color: var(--pv-ink) !important; }

/* Footer social controls remain visible even when older color tokens are
   missing or the footer uses a light surface. */
.pv-footer__social { display: flex !important; flex-wrap: wrap; align-items: center; gap: 9px; min-height: 34px; }
.pv-footer-social { display: inline-grid !important; place-items: center; flex: 0 0 auto; visibility: visible !important; opacity: 1 !important; color: #fff !important; }
.pv-footer-social svg { display: block !important; width: 52%; height: 52%; fill: currentColor; }

@media (max-width: 900px) {
	.pv-layout--has-aside,
	.pv-layout--aside-left { grid-template-columns: minmax(0, 1fr); }
	.pv-layout--aside-left .pv-layout__aside,
	.pv-layout--aside-left .pv-layout__main { grid-column: 1; }
	.pv-layout__aside { margin-top: 28px; }
}

@media (max-width: 520px) {
	.pv-related-posts__head { grid-template-columns: minmax(18px, 1fr) auto minmax(18px, 1fr); gap: 9px; }
	.pv-related-posts__head h2 { font-size: 1.08rem; }
}
