:root{
	--sd-gap: 5px;
	--sd-pad: 10px;
	--sd-bar-h: 128px;
	--sd-midnight: #2c3e50;
	--sd-asphalt: #34495e;
	--sd-amethyst: #9b59b6;
	--sd-river: #3498db;
	--sd-emerald: #2ecc71;
	--sd-greensea: #16a085;
	--sd-asbestos: #7f8c8d;
}

body{
	margin: 0;
	padding: 0;
	background: var(--sd-midnight);
	font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
	font-size: 13px;
	line-height: 1.5;
}
a{
	color: white;
}
canvas{
	float: left;
	margin: 0 0 5px 0;
}
em{
	font-weight: bold;
	font-style: italic;
}
h1{
	margin: 0;
	padding: 0;
	font-size: 1.2em;
}
ul{
	list-style: none;
}
.active{
	text-decoration: underline;
	color: black;
}
.selected{
	color: white;
}
.b_on{
	background: var(--sd-emerald);
}
.b_off{
	background: var(--sd-asbestos);
}
#content{
	padding: 0 5px 5px 10px;
}

#ctrl_bar{
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	width: auto;
	box-sizing: border-box;
	padding: var(--sd-gap) var(--sd-gap) var(--sd-gap) var(--sd-pad);
	height: auto;
	min-height: var(--sd-bar-h);
	background: var(--sd-midnight);
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: var(--sd-gap);
	z-index: 10;
}
#ctrl_bar > div,
#ctrl_bar > ul{
	float: none;
	margin: 0;
	min-height: 0;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

#ctrl_bar #info{
	padding: 8px var(--sd-pad);
	min-width: 190px;
	background: var(--sd-asphalt);
	color: var(--sd-greensea);
}
#ctrl_bar #info h1{
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #fff;
	margin-bottom: 2px;
}
#ctrl_bar #info p{
	margin: 0;
	font-size: 12px;
	font-variant-numeric: tabular-nums;
}
#ctrl_bar #launcher,
#ctrl_bar #view,
#ctrl_bar #count{
	padding: var(--sd-gap);
	background: var(--sd-amethyst);
	gap: 3px;
	min-width: 110px;
	color: white;
}
#ctrl_bar #launcher li,
#ctrl_bar #view li,
#ctrl_bar #count li{
	margin: 0;
	padding: 4px 10px;
	cursor: pointer;
	color: #fff;
	transition: background 120ms ease;
	user-select: none;
}
#ctrl_bar #launcher li:hover,
#ctrl_bar #view li:hover,
#ctrl_bar #count li:hover{
	background: var(--sd-emerald);
}
#ctrl_bar #view label,
#ctrl_bar #count label{
	margin: 0 0 4px 0;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}
#ctrl_bar #view ul,
#ctrl_bar #count ul{
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 3px;
}
#ctrl_bar #view li,
#ctrl_bar #count li{
	white-space: nowrap;
}

#ctrl_bar #links,
#ctrl_bar #listings,
#ctrl_bar #help{
	padding: 8px var(--sd-gap);
	background: var(--sd-river);
	gap: 1px;
	color: white;
}
#ctrl_bar #links li,
#ctrl_bar #listings li,
#ctrl_bar #help li{
	margin: 0;
	padding: 1px var(--sd-gap);
}
#ctrl_bar #links a,
#ctrl_bar #listings a,
#ctrl_bar #help a{
	display: block;
	padding: 1px 4px;
	text-decoration: none;
	white-space: nowrap;
	border-left: 2px solid transparent;
	transition: border-color 120ms ease, background 120ms ease;
}
#ctrl_bar #links a:hover,
#ctrl_bar #listings a:hover,
#ctrl_bar #help a:hover{
	background: rgba(255, 255, 255, 0.16);
	border-left-color: #fff;
}
#ctrl_bar a.here{
	border-left-color: #fff;
	background: rgba(255, 255, 255, 0.22);
	font-weight: 600;
}

#ctrl_bar #sma_main_ctrl,
#ctrl_bar #commons,
#ctrl_bar #calculations{
	padding: 5px;
	background: #fff;
	min-height: 0;
}
#ctrl_bar #commons{
	min-width: 0;
	flex: 0 0 auto;
	width: auto;
}
#ctrl_bar #sma_main_ctrl ul,
#ctrl_bar #commons ul,
#ctrl_bar #calculations ul{
	padding: 0;
	margin: 0;
}
#ctrl_bar #commons li,
#ctrl_bar #calculations li{
	display: inline;
	padding: 0 7px;
}
#ctrl_bar #sma_main_ctrl li{
	padding: 0 7px;
	min-width: 52px;
	box-sizing: border-box;
}
#ctrl_bar #sma_main_ctrl{
	width: 66px;
	min-width: 66px;
	max-width: 66px;
	flex: 0 0 66px;
}
#ctrl_bar #commons p{
	padding: 0;
	margin: 0;
}
#ctrl_bar #sma_menu{
	padding: 0;
	width: auto;
	flex-direction: row;
	align-items: stretch;
	gap: var(--sd-gap);
}
#ctrl_bar #sma_menu > div{
	float: none;
	margin: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

#ctrl_bar a:focus-visible,
#ctrl_bar li:focus-visible,
#ctrl_bar div:focus-visible{
	outline: 2px solid #fff;
	outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce){
	#ctrl_bar *{ transition: none !important; }
}

#allCanvas,
#main_container,
#middle,
#chart{
	margin-top: calc(var(--sd-bar-h) + 8px);
}
@media (max-width: 1100px){
	:root{ --sd-bar-h: 256px; }
}
@media (max-width: 720px){
	:root{ --sd-bar-h: 384px; }
}

#main_container{
	display: flex;
	flex-wrap: nowrap;
	align-items: flex-start;
}
#main_container > #myCanvas{
	float: none;
	display: block;
	flex: 0 0 auto;
}
#main_container > #infos{
	flex: 0 0 300px;
	width: 300px;
	max-width: none;
	float: none;
	margin-left: 2px;
	word-wrap: break-word;
}
#main_container > #infos > #isniColumn{
	box-sizing: border-box;
	width: 100%;
}
#main_container > #infos > #isniColumn .isni-box.open{
	margin-bottom: 10px;
}

#cookies{
	padding: 5px 10px;
	background: var(--sd-emerald);
}
#cookies p, #selection p{
	padding: 0;
	margin: 0;
}
#selection{
	background: orange;
	padding: 5px 10px;
}
#titles{
	color: white;
	background: var(--sd-amethyst);
	padding: 5px 10px;
	margin: 0;
}
#titles.t-boxed{
	max-height: 36vh;
	overflow-y: auto;
	overscroll-behavior: contain;
}
#titles.t-boxed.t-hd-on{
	padding-top: 0;
}
#titles.t-boxed.t-hd-on li.t-hd{
	position: sticky;
	top: 0;
	margin-top: 0;
	z-index: 1;
}
.sd-country{
	margin: 2px 0 0 0;
	font-size: .85em;
	opacity: .7;
	letter-spacing: .01em;
}
#titles li.t-hd{
	margin: -5px -10px 0;
	padding: 0;
	background: #5b2c6f;
}
#titles.is-folded{
	padding-bottom: 0;
}
#titles .t-toggle{
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	width: 100%;
	box-sizing: border-box;
	margin: 0;
	padding: 6px 10px;
	border: 0;
	background: none;
	color: #fff;
	font: inherit;
	letter-spacing: .04em;
	text-align: left;
	cursor: pointer;
}
#titles .t-toggle:hover,
#titles .t-toggle:focus{
	background: rgba(255, 255, 255, .08);
	outline: none;
}
#titles .t-caret{
	flex: 0 0 auto;
	width: 0;
	height: 0;
	border-left: 5px solid transparent;
	border-right: 5px solid transparent;
	border-top: 5px solid currentColor;
	transition: transform 120ms ease;
}
#titles.is-folded .t-caret{
	transform: rotate(-90deg);
}
#titles.is-folded li:not(.t-hd){
	display: none;
}

#legend{
	clear: both;
	background: var(--sd-asphalt);
	color: #ecf0f1;
	padding: 10px 14px;
	margin: 0 0 10px 0;
	max-width: 1170px;
	font-size: 12px;
}
#legend .lg-title{
	margin: 0 0 6px 0;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #fff;
}
#legend button.lg-title{
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 0;
	border: 0;
	background: none;
	font: inherit;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #fff;
	text-align: left;
	cursor: pointer;
}
#legend .lg-caret{
	display: inline-block;
	width: 0;
	height: 0;
	margin-left: 10px;
	border-left: 5px solid transparent;
	border-right: 5px solid transparent;
	border-top: 6px solid #fff;
	transition: transform .15s;
}
#legend.is-collapsed .lg-title{
	margin-bottom: 0;
}
#legend.is-collapsed #lg_body{
	display: none;
}
#legend.is-collapsed .lg-caret{
	transform: rotate(-90deg);
}
#legend .lg-intro,
#legend .lg-note{
	max-width: 80ch;
	text-align: justify;
	margin: 0 0 10px 0;
}
#legend .lg-intro em,
#legend .lg-note em{
	font-style: normal;
	color: #fff;
	font-weight: 600;
}
#legend .lg-cols{
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
}
#legend .lg-cols > div{
	flex: 1 1 300px;
}
#legend p{
	margin: 0 0 4px 0;
}
#legend ul{
	margin: 0;
	padding: 0;
}
#legend li{
	margin: 0 0 3px 0;
	color: #bdc3c7;
	text-align: justify;
}
#legend li em{
	color: #fff;
	font-style: normal;
	font-weight: normal;
}
#legend .sq{
	display: inline-block;
	width: 11px;
	height: 11px;
	margin: 0 4px -1px 0;
	border: 1px solid rgba(0, 0, 0, 0.35);
}

#ctrl_bar #sma_main_ctrl li,
#ctrl_bar #commons ul li{
	cursor: pointer;
}
#ctrl_bar div#commons{
	flex-direction: row;
	align-items: center;
	justify-content: flex-start;
	gap: 6px;
}
#ctrl_bar div#commons > p{
	white-space: nowrap;
}

th.sortable{
	cursor: pointer;
	user-select: none;
	white-space: nowrap;
}
th.sortable .sort-caret{
	display: inline-block;
	width: 0;
	height: 0;
	margin-left: 6px;
	vertical-align: middle;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-top: 5px solid currentColor;
	opacity: .25;
	transition: opacity 120ms ease;
}
th.sortable:hover .sort-caret{
	opacity: .55;
}
th.sortable.is-sorted .sort-caret{
	opacity: 1;
}
th.sortable.is-asc .sort-caret{
	border-top: 0;
	border-bottom: 5px solid currentColor;
}
th.sortable:focus-visible{
	outline: 2px solid #fff;
	outline-offset: -2px;
}
@media (prefers-reduced-motion: reduce){
	th.sortable .sort-caret{ transition: none; }
}
