/* Stature — "In This Story" article navigation (see inc/stature-toc.php) */

.stature-toc {
	--stoc-ink: #111;
	--stoc-text: #3d3d3d;
	--stoc-red: #cf0000;
	--stoc-rule: #111;
	--stoc-hair: #dcdcdc;
	--stoc-top: 96px;
	font-family: Outfit, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
	color: var(--stoc-text);
}

/* anchors land clear of the sticky header */
.stature-toc-target {
	scroll-margin-top: 72px;
}

.stature-toc-target:focus {
	outline: none;
}

@media (min-width: 1025px) {
	.stature-toc-target {
		scroll-margin-top: 96px;
	}
}

/* lists (reset the article list styles) */
.single-post .entry-content .stature-toc ol.stature-toc__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.single-post .entry-content .stature-toc li.stature-toc__item {
	margin: 0;
	padding: 0;
	list-style: none;
}

.single-post .entry-content .stature-toc li.stature-toc__item::marker {
	content: none;
}

.single-post .entry-content .stature-toc a.stature-toc__link {
	position: relative;
	display: grid;
	grid-template-columns: 26px minmax(0, 1fr);
	column-gap: 10px;
	align-items: baseline;
	padding: 8px 0;
	color: var(--stoc-text);
	font: 400 15px/1.4 Outfit, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
	letter-spacing: 0;
	text-decoration: none;
	border: 0;
	box-shadow: none;
	transition: color 0.15s ease;
}

.stature-toc .stature-toc__num {
	color: var(--stoc-red);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.06em;
	font-variant-numeric: tabular-nums lining-nums;
}

.single-post .entry-content .stature-toc a.stature-toc__link:hover .stature-toc__text {
	color: var(--stoc-ink);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.single-post .entry-content .stature-toc a.stature-toc__link:focus-visible {
	outline: 2px solid var(--stoc-ink);
	outline-offset: 2px;
}

.single-post .entry-content .stature-toc a.stature-toc__link[aria-current="location"] {
	color: var(--stoc-ink);
}

/* phones and tablets: compact, collapsible, in the reading column */
.single-post .entry-content .stature-toc {
	margin: 32px 0 0;
	padding: 0;
}

.stature-toc__compact {
	border-top: 1px solid var(--stoc-rule);
	border-bottom: 1px solid var(--stoc-hair);
}

.stature-toc__summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 48px;
	padding: 0 2px 0 0;
	color: var(--stoc-ink);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	list-style: none;
	cursor: pointer;
}

.stature-toc__summary::-webkit-details-marker {
	display: none;
}

.stature-toc__summary::marker {
	content: "";
}

.stature-toc__summary:focus-visible {
	outline: 2px solid var(--stoc-ink);
	outline-offset: 2px;
}

.stature-toc__chevron {
	width: 8px;
	height: 8px;
	margin-right: 6px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: translateY(-2px) rotate(45deg);
	transition: transform 0.2s ease;
}

.stature-toc__compact[open] .stature-toc__chevron {
	transform: translateY(2px) rotate(-135deg);
}

.stature-toc__compact .stature-toc__list {
	padding-bottom: 12px !important;
}

.single-post .entry-content .stature-toc__compact a.stature-toc__link {
	min-height: 44px;
	padding: 11px 0;
	box-sizing: border-box;
}

@supports (interpolate-size: allow-keywords) {
	.stature-toc__compact {
		interpolate-size: allow-keywords;
	}

	.stature-toc__compact::details-content {
		block-size: 0;
		overflow: hidden;
		transition: block-size 0.25s ease, content-visibility 0.25s allow-discrete;
	}

	.stature-toc__compact[open]::details-content {
		block-size: auto;
	}
}

.stature-toc__rail {
	display: none;
}

/* wide screens: sticky rail beside the article column (standard Stature article layout) */
@media (min-width: 1200px) {

	body.stature-has-toc .single-standard-7 .entry-content {
		position: relative;
		margin-left: calc(50% - 480px);
		margin-right: auto;
	}

	body.stature-has-toc .single-standard-7 .entry-content .stature-toc {
		position: absolute;
		top: auto;
		left: calc(100% + 56px);
		width: 224px;
		margin: 0;
	}

	body.stature-has-toc .single-standard-7 .stature-toc__compact {
		display: none;
	}

	body.stature-has-toc .single-standard-7 .stature-toc__rail {
		display: block;
		position: sticky;
		top: var(--stoc-top);
		margin-top: 22px;
		padding-top: 14px;
		border-top: 2px solid var(--stoc-rule);
	}

	.stature-toc__title {
		margin: 0 0 6px;
		color: var(--stoc-ink);
		font-size: 12px;
		font-weight: 700;
		line-height: 1.3;
		letter-spacing: 0.14em;
		text-transform: uppercase;
	}

	body.stature-has-toc .single-standard-7 .stature-toc__rail a.stature-toc__link[aria-current="location"]::before {
		content: "";
		position: absolute;
		top: 9px;
		bottom: 9px;
		left: -14px;
		width: 2px;
		background: var(--stoc-red);
	}

	/* wide modules extend to the left only, so they never pass under the rail */
	body.stature-has-toc .single-standard-7 .stature-progress,
	body.stature-has-toc .single-standard-7 .entry-content [class*="wp-block"].alignwide,
	body.stature-has-toc .single-standard-7 .entry-content [class*="wp-block"].alignfull,
	body.stature-has-toc .single-standard-7 .entry-content .alignfull {
		width: calc(100% + 80px);
		max-width: none;
		margin-left: -80px;
		margin-right: 0;
	}

	body.stature-has-toc .single-standard-7 .entry-content .wp-block-image.alignwide img,
	body.stature-has-toc .single-standard-7 .entry-content .wp-block-image.alignfull img {
		width: 100%;
		max-width: 100%;
		margin-left: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.single-post .entry-content .stature-toc a.stature-toc__link,
	.stature-toc__chevron,
	.stature-toc__compact::details-content {
		transition: none !important;
	}
}

@media print {
	.stature-toc {
		display: none !important;
	}
}
