/**
 * Graphoscene post content: set Key takeaways and the table of contents apart from the article
 * and from each other. Colours derive from the theme's text colour, so this fits light and dark
 * themes without settings. Opt out with add_filter( 'grapho_content_styles', '__return_false' ).
 */

.grapho-key-takeaways,
.grapho-toc-box,
ul.grapho-toc:not(.grapho-toc-box ul) {
	box-sizing: border-box;
	margin-block: 2em;
	padding: 1.25em 1.5em;
	border: 1px solid color-mix(in srgb, currentColor 16%, transparent);
	border-radius: 8px;
}

/* Key takeaways: tinted panel with an accent edge. */
.grapho-key-takeaways {
	background: color-mix(in srgb, currentColor 5%, transparent);
	border-inline-start: 4px solid color-mix(in srgb, currentColor 45%, transparent);
}

.grapho-key-takeaways > :first-child,
.grapho-toc-box > :first-child {
	margin-block-start: 0;
}

.grapho-key-takeaways > :last-child,
.grapho-toc-box > :last-child {
	margin-block-end: 0;
}

.grapho-key-takeaways h2 {
	font-size: 1.25em;
	margin-block-end: 0.5em;
}

/* Table of contents: outlined box with a small label. */
.grapho-toc-title {
	margin-block-end: 0.5em;
	font-size: 0.8em;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	opacity: 0.75;
}

.grapho-toc-box ul.grapho-toc {
	margin: 0;
}

.grapho-toc li {
	margin-block: 0.3em;
}

/* Posts generated before 3.4.2 have a bare list; give it the box and the label. */
ul.grapho-toc:not(.grapho-toc-box ul) {
	padding-inline-start: 2.75em;
}

ul.grapho-toc:not(.grapho-toc-box ul)::before {
	content: var(--grapho-toc-label, "Contents");
	display: block;
	margin-block-end: 0.5em;
	margin-inline-start: -1.25em;
	font-size: 0.8em;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	opacity: 0.75;
}
