.pc-chip {
	--pc-bg: #FDDF82;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 14px;
	border-radius: 999px;
	background: var(--pc-bg);
	color: #16161a !important;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none !important;
	box-shadow: none !important;
	transition: filter .15s ease;
}
.pc-chip:hover { filter: brightness(.96); }
.pc-chip:focus-visible { outline: 2px solid #16161a; outline-offset: 2px; }
.pc-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #f0437a;
	flex: none;
}
.pc-chip.pc-is-dark { color: #fff !important; }
.pc-chip.pc-is-dark .pc-dot { background: #fff; }

/* ---------- Numbered H2 headings ---------- */
.pc-h2 { scroll-margin-top: 90px; }
.pc-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.9em;
	height: 1.5em;
	padding: 0 .35em;
	margin-right: .35em;
	border-radius: 6px;
	background: #f0437a;
	color: #fff;
	font-size: .62em;
	font-weight: 800;
	line-height: 1;
	letter-spacing: .02em;
	font-variant-numeric: tabular-nums;
	vertical-align: .25em;
}

/* ---------- H2 highlight bar (colour/opacity: Settings → Post Chip) ---------- */
.pc-h2 .pc-h2-text,
.pc-h2-preview .pc-h2-text {
	/* Bar sits on the lower part of each line, like a marker stroke. */
	background-image: linear-gradient(
		to bottom,
		transparent 38%,
		var(--pc-h2-bar, rgba(255, 77, 77, 1)) 38%,
		var(--pc-h2-bar, rgba(255, 77, 77, 1)) 88%,
		transparent 88%
	);
	background-repeat: no-repeat;
	background-size: 100% 100%;
	padding: 0 .3em;
	margin: 0 -.05em;
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone; /* every wrapped line gets its own bar */
}

/* ---------- Table of contents ---------- */
.pc-toc {
	--pc-toc-cols: 2;
	--pc-pink: #f0437a;
	border: 1px solid #e6e6ea;
	border-radius: 22px;
	padding: 24px 24px 22px;
	margin: 1.5em 0 2em;
	background: #fff;
	color: #16161a;
	box-sizing: border-box;
}
.pc-toc-title {
	margin: 0 0 16px !important;
	padding: 0;
	font-size: 22px;
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: -0.02em;
}
/* Grid fills row by row: 1 | 2, 3 | 4, 5 | 6 … */
.pc-toc-list {
	display: grid;
	grid-template-columns: repeat(var(--pc-toc-cols), minmax(0, 1fr));
	column-gap: 34px;
	row-gap: 12px;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
	counter-reset: pc-toc;
}
.pc-toc-list li {
	position: relative;
	counter-increment: pc-toc;
	margin: 0 !important;
	padding: 0 0 0 1.9em !important;
	font-size: 16px;
	line-height: 1.5;
}
.pc-toc-list li::before {
	content: counter(pc-toc) ".";
	position: absolute;
	left: 0;
	top: 0;
	min-width: 1.5em;
	text-align: right;
	color: var(--pc-pink);
	font-weight: 500;
	font-variant-numeric: tabular-nums;
}

/* ---------- Show all / show less ---------- */
.pc-toc.is-collapsed .pc-toc-more { display: none; }
.pc-toc.is-expanding .pc-toc-more { animation: pc-toc-in .25s ease both; }
@keyframes pc-toc-in {
	from { opacity: 0; transform: translateY(-4px); }
	to   { opacity: 1; transform: none; }
}
.pc-toc-foot {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-top: 18px;
}
.pc-toc-foot::before,
.pc-toc-foot::after {
	content: "";
	flex: 1;
	height: 1px;
	background: #e6e6ea;
}
.pc-toc-toggle {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	margin: 0;
	padding: 0 !important;
	border: 1px solid #e6e6ea !important;
	border-radius: 50% !important;
	background: #fff !important;
	color: var(--pc-pink) !important;
	box-shadow: none !important;
	cursor: pointer;
	transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.pc-toc-toggle:hover {
	background: var(--pc-pink) !important;
	border-color: var(--pc-pink) !important;
	color: #fff !important;
}
.pc-toc-toggle:focus-visible { outline: 2px solid var(--pc-pink); outline-offset: 2px; }
.pc-toc-chevron { display: block; transition: transform .25s ease; }
.pc-toc-toggle[aria-expanded="true"] .pc-toc-chevron { transform: rotate(180deg); }
.pc-toc-toggle-label {
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}
.pc-toc-list a {
	color: #16161a !important;
	text-decoration: underline !important;
	text-decoration-color: var(--pc-pink) !important;
	text-decoration-thickness: 2px !important;
	text-underline-offset: 5px;
	box-shadow: none !important;
	transition: color .15s ease;
}
.pc-toc-list a:hover { color: var(--pc-pink) !important; }

@media (max-width: 640px) {
	.pc-toc { padding: 20px 18px 16px; border-radius: 18px; }
	.pc-toc-title { font-size: 19px; }
	.pc-toc-list { grid-template-columns: minmax(0, 1fr); row-gap: 10px; }
	.pc-toc-list li { font-size: 15px; }
	.pc-toc-foot { margin-top: 14px; }
}

/* ---------- Related posts ---------- */
.pc-related {
	border: 1px solid #e6e6ea;
	border-radius: 22px;
	padding: 22px 22px 8px;
	margin: 0 0 2em;
	background: #fff;
	color: #16161a;
	box-sizing: border-box;
}
.pc-related-title {
	margin: 0 0 16px !important;
	padding: 0;
	font-size: 22px;
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: -0.02em;
}
.pc-related-list {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
}
.pc-related-list li {
	margin: 0 0 16px !important;
	padding: 0 !important;
}
.pc-related-list li::before { content: none !important; }
.pc-related-item {
	display: flex;
	align-items: center;
	gap: 14px;
	color: #16161a !important;
	text-decoration: none !important;
	box-shadow: none !important;
}
.pc-related-thumb {
	flex: none;
	width: 64px;
	height: 64px;
	border-radius: 12px;
	overflow: hidden;
	background: #eee;
}
.pc-related-thumb img {
	display: block;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	object-fit: cover;
	margin: 0 !important;
	transition: transform .3s ease;
}
.pc-related-name {
	font-size: 16px;
	font-weight: 800;
	line-height: 1.3;
	letter-spacing: -0.01em;
	min-width: 0;
}
.pc-related-item:hover .pc-related-name {
	text-decoration: underline;
	text-decoration-color: #f0437a;
	text-decoration-thickness: 2px;
	text-underline-offset: 4px;
}
.pc-related-item:hover .pc-related-thumb img { transform: scale(1.06); }

@media (prefers-reduced-motion: no-preference) {
	html:has(.pc-toc) { scroll-behavior: smooth; }
}
