/** plugin: Entity Box Backgrounds #2.3 code **/
/* BEGIN Entity Box Backgrounds by Salvatos */
@media screen {
    .sidebar-section-box {
        --sidebar-section-background: hsl(var(--b1)/1);
        --sidebar-section-padding: 10px;
        border-radius: .25rem;
        box-shadow: 0 1px 1px rgba(0,0,0,.1);
    }

    /* Post headings */
    .post-header {
        background-color: var(--box-background, hsl(var(--b1)/1));
        border-radius: .25rem;
        padding: .2rem .5rem;
    }
    .post-title {
        margin: 0;
    }
}
/* END Entity Box Backgrounds by Salvatos */

/** plugin: Cleaner Printing #0.5 code **/
/* BEGIN Cleaner Printing */
@media print {
	:root {
		/* Force entity-content to use grey-on-white Base theme colors */
		--box-background: unset;
		--body-text: #636b6f;
		--header-text: #222;
		--body-background: unset;
	}
  	
  	/* Ensure that the browser uses its default light theme settings */
  	html {
		color-scheme: light;
	}
	
	/* Remove custom overall and section backgrounds and force dark grey font */
	html, body, .wrapper, .content-wrapper, .content, .entity-name, .box, .bg-box, td, th {
		background: none !important;
		background-color: unset !important;
		box-shadow: unset !important;
    	color: #222 !important;
	}
	
	/* Unnecessary space at the top */
	.content {
		padding-top: 0;
	}
	
	/* Remove various unwanted sections from entity Overview and subpages (Attributes, Abilities, etc.) */
	.entity-name-header :not(.entity-name),
	.entity-header .header-buttons,
	.entity-submenu,
	.entity-history,
	.entity-empty-pin,
	#toc, /* For Auto TOC script users */
	.box-header i,
	.btn-new-post,
  	a[role="button"],
  	a[data-toggle="tooltip"],
  	i.fa-chevron-up, i.fa-chevron-down,
	header,
	footer,
  	.main-sidebar,
  	.alert {
		display: none !important;
	}
  
  	/* Sidebar nuisance */
  	#main-content {
		margin-left: 0 !important;
	}
	
	/* Attributes: live edit*/
	.live-edit-parsed::after {
		content: "";
	}
}
/* END Cleaner Printing */

/** plugin: Vertical Timelines #2.2 code **/
/* BEGIN Vertical Timelines by Salvatos */
/* Set vars */
.timeline {
	--svtlinecolor: hsl(var(--s));
	--svtbgc: hsl(var(--n));
	--svtbgt: hsl(var(--nc));
}
/* Container shorthand */
.kanka-entity-timeline:not(.kanka-tag-horizontaltimeline) .entity-main-block {
	container: svt / inline-size;
}
@container svt (width > 600px) {
	/* Position events */
	li[id|="timeline-element"] {
		width: 50%;
		padding-bottom: 25px;
	}
	li[id|="timeline-element"]:nth-child(2n+1) {
		left: 0;
		padding-right: 25px;
	}
	li[id|="timeline-element"]:nth-child(2n) {
		left: 50%;
		padding-left: 25px;
	}
	/* Shorten the bar on the last item so it doesn't collide with buttons */
	li[id|="timeline-element"]:last-child {
		padding-bottom: 0;
		margin-bottom: 15px;
	}
	/* Position markers*/
	li[id|="timeline-element"] > i {
		position: absolute;
		top: 7px;
		background-color: var(--svtbgc);
		color: var(--svtbgt);
	}
	li[id|="timeline-element"]:nth-child(2n) > i {
		left: calc(0% - 15px);
	}
	li[id|="timeline-element"]:nth-child(2n+1) > i {
		left: calc(100% - 15px);
	}
	/* Position lines */
	li[id|="timeline-element"]::before {
		display: block !important; /* important otherwise Kanka sets the last one to 'table' */
		width: 6px;
		border-radius: 0;
		background-color: var(--svtlinecolor);
	}
	li[id|="timeline-element"]:nth-child(2n)::before {
		left: calc(0% - 2px);
	}
	li[id|="timeline-element"]:nth-child(2n+1)::before {
		left: calc(100% - 2px);
	}
	/* Set radius of line start */
	:is(li[id|="timeline-element"]::after, li[id|="timeline-element"]:first-of-type::before) {
		border-top-left-radius: 5px !important;
		border-top-right-radius: 5px !important;
	}
	/* Fix length and set radius of line end */
	:is(li[id|="timeline-element"]::after, li[id|="timeline-element"]:last-of-type::before) {
		display: initial;
		height: calc(100% - 25px);
		border-bottom-left-radius: 5px !important;
		border-bottom-right-radius: 5px !important;
	}
	/* Reshape event blocks */
	.timeline-item {
		margin: 0;
	}
	/* Remove the misplaced box-shadow from Kanka */
	.timeline > li .timeline-item {
		box-shadow: unset;
	}
  	/* More consistent spacing around the toggle */
  	.element-toggle .icon-hide {
		padding-inline: 2px;
	}
	/* Set date markers */
	.bg-aqua + .timeline-item .text-neutral-content {--svtbgc:#00c0ef;--svtbgt:#fff}
	.bg-black + .timeline-item .text-neutral-content {--svtbgc:#111;--svtbgt:#fff}
	.bg-brown + .timeline-item .text-neutral-content {--svtbgc: #a35831;--svtbgt:#fff}
  	.bg-grey + .timeline-item .text-neutral-content {/* use defaults */}
	.bg-green + .timeline-item .text-neutral-content {--svtbgc:#00a65a;--svtbgt:#fff}
	.bg-light-blue + .timeline-item .text-neutral-content {--svtbgc:#3c8dbc;--svtbgt:#fff}
	.bg-maroon + .timeline-item .text-neutral-content {--svtbgc:#d81b60;--svtbgt:#fff}
	.bg-navy + .timeline-item .text-neutral-content {--svtbgc:#001f3f;--svtbgt:#fff}
	.bg-orange + .timeline-item  .text-neutral-content {--svtbgc:#ff851b;--svtbgt:#fff}
	.bg-pink + .timeline-item .text-neutral-content {--svtbgc:#ebbde9;--svtbgt:#fff}
	.bg-purple + .timeline-item .text-neutral-content {--svtbgc:#605ca8;--svtbgt:#fff}
	.bg-red + .timeline-item .text-neutral-content {--svtbgc:#dd4b39;--svtbgt:#fff}
	.bg-teal + .timeline-item .text-neutral-content {--svtbgc:#39cccc;--svtbgt:#111}
	.bg-yellow + .timeline-item .text-neutral-content {--svtbgc:#f39c12;--svtbgt:#fff}
	.timeline-item-head .text-neutral-content {
		position: absolute;
		top: 7px;
		width: max-content;
		padding: 5px 8px;
		border: 1px solid var(--svtbgc);
		border-radius: 3px;
		box-shadow: 0 1px 1px rgba(0,0,0,.1);
		background-color: var(--svtbgc);
		color: var(--svtbgt);
      	overflow: visible;
	}
	li[id|="timeline-element"]:nth-child(2n) .text-neutral-content {
		right: calc(100% + 75px);
	}
	li[id|="timeline-element"]:nth-child(2n+1) .text-neutral-content {
		left: calc(100% + 75px);
	}
	/* Fancy arrowheads */
	li[id|="timeline-element"]:nth-child(2n) .text-neutral-content:after,
	li[id|="timeline-element"]:nth-child(2n+1) .text-neutral-content:before {
		content: "";
		display: block;
		position: absolute;
		top: 1px;
		border-top: 15px solid transparent;
		border-bottom: 15px solid transparent;
		border-radius: 50%;
	}
	li[id|="timeline-element"]:nth-child(2n) .text-neutral-content:after {
		right: -25px;
		border-right: none;
		border-left: 25px solid var(--svtbgc);
	}
	li[id|="timeline-element"]:nth-child(2n+1) .text-neutral-content:before {
		left: -25px;
		border-left: none;
		border-right: 25px solid var(--svtbgc);
	}
}
/* END Vertical Timelines by Salvatos */

/** plugin: Rainbow Sidebar #1.1 code **/
:root {
  --ctp-rosewater: #F4DBD6;
  --ctp-flamingo: #F0C6C6;
  --ctp-pink: #F5BDE6;
  --ctp-mauve: #C6A0F0;
  --ctp-red: #ED8796;
  --ctp-maroon: #EE99A0;
  --ctp-peach: #F5A97F;
  --ctp-yellow: #EED49F;
  --ctp-green: #A6DA95;
  --ctp-teal: #8BD5CA;
  --ctp-sky: #91D7E3;
  --ctp-sapphire: #7DC4E4;
  --ctp-blue: #8AADF4;
  --ctp-lavender: #B7BDF8;
}
.sidebar-menu li:nth-child(11n+1) { --sidebar-text: var(--ctp-red); }
.sidebar-menu li:nth-child(11n+2) { --sidebar-text: var(--ctp-maroon); }
.sidebar-menu li:nth-child(11n+3) { --sidebar-text: var(--ctp-peach); }
.sidebar-menu li:nth-child(11n+4) { --sidebar-text: var(--ctp-yellow); }
.sidebar-menu li:nth-child(11n+5) { --sidebar-text: var(--ctp-green); }
.sidebar-menu li:nth-child(11n+6) { --sidebar-text: var(--ctp-teal); }
.sidebar-menu li:nth-child(11n+7) { --sidebar-text: var(--ctp-sky); }
.sidebar-menu li:nth-child(11n+8) { --sidebar-text: var(--ctp-sapphire); }
.sidebar-menu li:nth-child(11n+9) { --sidebar-text: var(--ctp-blue); }
.sidebar-menu li:nth-child(11n+10) { --sidebar-text: var(--ctp-lavender); }
.sidebar-menu li:nth-child(11n+11) { --sidebar-text: var(--ctp-mauve); }

.main-sidebar .sidebar-menu li.sidebar-quick-links > a,
.main-sidebar .sidebar-menu li.section-campaigns > a,
.main-sidebar .sidebar-menu li.section-campaign > a,
.main-sidebar .sidebar-menu li.section-other > a,
.main-sidebar .sidebar-menu li.section-other > span {
  --tw-text-opacity: 1;
  color: var(--sidebar-text, hsl(var(--sic)/var(--tw-text-opacity))) !important;
}

