/* Table of contents for posts — "Soft box" with hierarchy (owner, 2026-12-01). */
.pt-toc {
	margin: 22px 0;
	padding: 16px 20px;
	border-radius: 12px;
	background: #f6f8fb;
}

.pt-toc > summary {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 10px;
	font-weight: 700;
	font-size: 16px;
	color: #0f2a5f;
	list-style: none;
	cursor: pointer;
}

.pt-toc > summary::-webkit-details-marker {
	display: none;
}

.pt-toc:not([open]) > summary {
	margin: 0;
}

.pt-toc__chev {
	flex: none;
	margin-left: auto;
	color: #64748b;
	transition: transform 0.2s;
}

.pt-toc[open] .pt-toc__chev {
	transform: rotate(180deg);
}

.pt-toc__list,
.pt-toc__sub {
	margin: 0;
	padding: 0;
	list-style: none;
}

.pt-toc__list > li {
	position: relative;
	margin: 0 0 8px;
	padding-left: 16px;
	font-size: 15px;
	line-height: 1.45;
	break-inside: avoid;
}

.pt-toc__list > li::before {
	content: "";
	position: absolute;
	left: 2px;
	top: 0.55em;
	width: 7px;
	height: 7px;
	border-radius: 2px;
	background: #1d4ed8;
}

.pt-toc a {
	color: #1d4ed8;
	font-weight: 600;
	text-decoration: none;
}

.pt-toc a:hover,
.pt-toc a:focus-visible {
	text-decoration: underline;
}

.pt-toc__sub {
	margin: 5px 0 2px 5px;
}

.pt-toc__sub li {
	position: relative;
	margin: 0;
	padding: 2px 0 2px 20px;
	font-size: 14px;
}

.pt-toc__sub li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	border-left: 1.5px solid #b9c9e6;
}

.pt-toc__sub li:last-child::before {
	bottom: auto;
	height: 0.85em;
}

.pt-toc__sub li::after {
	content: "";
	position: absolute;
	left: 0;
	top: 0.85em;
	width: 12px;
	border-top: 1.5px solid #b9c9e6;
}

.pt-toc__sub a {
	font-weight: 500;
}

/* Numbers (optional) */
.pt-toc__n {
	display: inline-block;
	min-width: 24px;
	color: #64748b;
	font-variant-numeric: tabular-nums;
}

.pt-toc--nums .pt-toc__list > li {
	padding-left: 0;
}

.pt-toc--nums .pt-toc__list > li::before {
	display: none;
}

.pt-toc--nums .pt-toc__sub .pt-toc__n {
	min-width: 32px;
	font-size: 13px;
}

/* Jumping to a heading: keep it clear of the sticky header. */
.entry-content h2[id],
.entry-content h3[id] {
	scroll-margin-top: 90px;
}

@media (min-width: 601px) {
	.pt-toc > summary {
		cursor: default;
		pointer-events: none;
	}

	.pt-toc__chev {
		display: none;
	}
}

@media (max-width: 600px) {
	.pt-toc {
		padding: 14px 16px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.pt-toc__chev {
		transition: none;
	}
}
