/* =========================================================
   UNHEARD LAB - FLOATING LEFT TABLE OF CONTENTS
   Penscratch 2 + FlexiTOC
   ========================================================= */


/* ---------------------------------------------------------
   DESKTOP
   --------------------------------------------------------- */

@media screen and (min-width: 1440px) {

	/* Main floating TOC container */
	body.single-post .entry-content > nav.flexitoc {
		position: fixed !important;

		/* Left grey gutter */
		left: max(8px, calc((100vw - 1170px) / 2 - 182px));

		/* Vertical position */
		top: 275px !important;

		width: 170px !important;
		max-width: 170px !important;

		margin: 0 !important;
		padding: 0 !important;

		background: transparent !important;
		border: 0 !important;
		border-radius: 0 !important;
		box-shadow: none !important;

		height: auto !important;

		/*
		 * Long TOCs remain scrollable,
		 * but the scrollbar itself is hidden.
		 */
		max-height: calc(100vh - 295px) !important;
		overflow-y: auto !important;
		overflow-x: hidden !important;

		z-index: 50;
		box-sizing: border-box;

		scrollbar-width: none !important;
		-ms-overflow-style: none !important;
	}


	/* Hide scrollbar in Chrome / Edge / Safari */
	body.single-post .entry-content > nav.flexitoc::-webkit-scrollbar {
		display: none !important;
		width: 0 !important;
		height: 0 !important;
	}


	/* -----------------------------------------------------
	   FlexiTOC details container
	   ----------------------------------------------------- */

	body.single-post nav.flexitoc .flexitoc__details {
		display: block !important;

		width: 100% !important;
		height: auto !important;
		max-height: none !important;

		margin: 0 !important;
		padding: 0 !important;

		background: transparent !important;
		border: 0 !important;
		box-shadow: none !important;

		overflow: visible !important;
	}


	/* -----------------------------------------------------
	   "Table of contents" title
	   ----------------------------------------------------- */

	body.single-post nav.flexitoc summary {
		display: block !important;

		margin: 0 0 10px 0 !important;
		padding: 0 7px 4px 7px !important;

		color: #ffffff !important;

		font-size: 16px !important;
		font-weight: 700 !important;
		line-height: 1.35 !important;

		cursor: default;
		list-style: none !important;
	}

	body.single-post nav.flexitoc summary::marker {
		color: #e6e6e6 !important;
	}


	/* -----------------------------------------------------
	   Lists
	   ----------------------------------------------------- */

	body.single-post nav.flexitoc ul,
	body.single-post nav.flexitoc ol {
		display: block !important;

		margin: 0 !important;
		padding: 0 !important;

		list-style: none !important;

		height: auto !important;
		max-height: none !important;

		overflow: visible !important;
	}

	body.single-post nav.flexitoc li {
		display: block !important;

		margin: 1px 0 !important;
		padding: 0 !important;

		height: auto !important;
		max-height: none !important;
	}


	/* -----------------------------------------------------
	   Nested H3 entries
	   ----------------------------------------------------- */

	body.single-post nav.flexitoc li > ul,
	body.single-post nav.flexitoc li > ol {
		margin: 2px 0 3px 0 !important;
		padding-left: 14px !important;
	}


	/* -----------------------------------------------------
	   Top-level links
	   ----------------------------------------------------- */

	body.single-post nav.flexitoc a {
		display: block !important;

		width: 150px !important;
		max-width: 150px !important;

		margin: 0 !important;
		padding: 4px 7px !important;

		color: #dddddd !important;

		font-size: 15px !important;
		font-weight: 600 !important;
		line-height: 1.35 !important;

		text-decoration: none !important;

		border: 1px solid transparent !important;
		border-radius: 5px !important;
		box-shadow: none !important;

		background: transparent !important;

		opacity: 1 !important;

		box-sizing: border-box !important;
		overflow-wrap: break-word;

		transition:
			background-color 0.12s ease,
			border-color 0.12s ease,
			color 0.12s ease;
	}


	/* -----------------------------------------------------
	   Nested H3 links
	   ----------------------------------------------------- */

	body.single-post nav.flexitoc li > ul a,
	body.single-post nav.flexitoc li > ol a {
		width: 136px !important;
		max-width: 136px !important;

		color: #c9c9c9 !important;

		font-size: 14.5px !important;
		font-weight: 400 !important;

		padding-top: 3px !important;
		padding-bottom: 3px !important;
	}


	/* -----------------------------------------------------
	   Hover
	   ----------------------------------------------------- */

	body.single-post nav.flexitoc a:hover {
		color: #ffffff !important;

		background: rgba(255,255,255,0.055) !important;

		border-color: rgba(255,255,255,0.08) !important;
	}


	/* -----------------------------------------------------
	   ACTIVE SECTION
	   ----------------------------------------------------- */

	body.single-post nav.flexitoc a[aria-current="true"] {
		color: #ffffff !important;
		font-weight: 700 !important;

		background: rgba(255,255,255,0.09) !important;

		border-color: rgba(255,255,255,0.20) !important;
	}


	/* Active nested H3 */
	body.single-post nav.flexitoc li > ul a[aria-current="true"],
	body.single-post nav.flexitoc li > ol a[aria-current="true"] {
		font-weight: 600 !important;
	}


	/* -----------------------------------------------------
	   If an H3 is active, subtly highlight its parent H2
	   ----------------------------------------------------- */

	body.single-post nav.flexitoc li:has(> ul a[aria-current="true"]) > a,
	body.single-post nav.flexitoc li:has(> ol a[aria-current="true"]) > a {
		color: #f5f5f5 !important;
		font-weight: 600 !important;
	}


	/* -----------------------------------------------------
	   Remove Jetpack "Share this:"
	   ----------------------------------------------------- */

	body.single-post nav.flexitoc li:has(> a[href="#share-this"]) {
		display: none !important;
	}

}


/* =========================================================
   LAPTOP / TABLET / MOBILE
   ========================================================= */

@media screen and (max-width: 1439px) {

	body.single-post .entry-content > nav.flexitoc {
		display: none !important;
	}

}

/* =========================================================
   UNHEARD LAB - ARTICLE TYPOGRAPHY & SPACING
   ========================================================= */

/* Default article font size */
.entry-content {
	font-size: 16px !important;
}

/* All paragraph blocks */
.entry-content p.wp-block-paragraph {
	line-height: 26px !important;
	margin-bottom: 16px !important;
}

/* Paragraph-style section titles */
.entry-content p.wp-block-paragraph[style*="font-size:20px"] {
	margin-bottom: 10px !important;
}

/* Real heading blocks */
.entry-content h2,
.entry-content h3,
.entry-content h4 {
	margin-top: 8px !important;
	margin-bottom: 8px !important;
}