/* * * INFO * * *\
CSS is generally written in BEM style. getbem.com

Classes also have various prefixes to define their purpose.

List of prefixes: 
    | no prefix. Generic block. 
l   | layout. Defines basic block structure and spacing.
is  | is-something. Implies a togglable state
has | has-something. Implies a togglable state
^   | ^ is & has do nothing on their own and are applied over other classes.
o   | override. Applied to many elements to override styles
js  | javascript. Adds functionality, *not* used for style
\* * * **** * * */



/* BASICS */

html {
	--background: #fff;
	--invert-background: #212121;
	--text: #020202;
	--text-light: #666;
	--accent: #2e51a2;
	--accent-box: rgba(255,255,255,0.3);
	--accent-text: #fff;
	--accent--error: rgb(188, 70, 70);
	--accent--warn: rgb(156, 156, 71);
	--border-light: rgb(216, 216, 216);
	--border-heavy: rgb(107, 107, 107);
	--box: #ececec;

	box-sizing: border-box;
}
* {
	box-sizing: inherit;
}

body {
	background: var(--background);
	margin: 0;
	color: var(--text);
	font: 14px/1.3 Roboto, Arial, Helvetica, sans-serif;
}

.is-not-scrollable {
	overflow: hidden;
}

.hyperlink {
	text-decoration: none;
	color: var(--accent);
	cursor: pointer;
}
.hyperlink--plain:not(:hover) {
	color: var(--text);
}
.hyperlink:hover {
	text-decoration: underline;
}
.hyperlink.is-active {
	font-weight: bold;
}

.icon {
	font-size: 0.8em;
}


/* Buttons */

.button-row {
	display: flex;
	gap: 8px;
}

.button {
	display: inline-block;
	padding: 3px 6px;
	background: none;
	border: 2px solid var(--border-light);
	border-radius: 6px;
	margin: 0;
	color: inherit;
	font: inherit;
	vertical-align: middle;
	text-decoration: none;
	cursor: pointer;
	transition: transform 0.1s ease-out;
}
.button:active {
	transform: scale(0.93);
}
.button--highlighted {
	background: var(--accent);
	border-color: var(--accent);
	color: var(--accent-text);
}
.button--danger {
	background: #a22e2e;
	border-color: #a22e2e;
	color: var(--accent-text);
}
.button--unusable {
	cursor: default;
	transform: none !important;
}
.button.has-selected {
	color: var(--accent);
	border-color: var(--accent);
}

.swappable-text {
	height: 1.3em;
	overflow: hidden;
	line-height: 1.3em;
}
.swappable-text__text {
	transition: transform 0.1s ease;
}
.swappable-text.is-swapped .swappable-text__text {
	transform: translateY(-1.3em);
}



/* Divider */

.divider {
	border: none;
	border-bottom: 2px dotted var(--border-heavy);
	margin: 16px 0;
}


/* Text */

.section-header {
	margin: 0 0 8px;
	font-size: 1.3em;
	font-weight: 700;
}

.header-text {
	display: block;
	margin-bottom: 4px;
	font-weight: 700;
}


/* Fields/Inputs */

.input {
	display: block;
	width: calc(100% - 12px);
	padding: 4px;
	border: 2px solid var(--border-light);
	border-radius: 4px;
	box-sizing: content-box;
	resize: none;
	font: inherit;
	scrollbar-color: var(--border-heavy) var(--background);
}

.input--textarea {
	height: 4.2em;
	min-height: 1.3em;
	max-height: 70vh;
	resize: vertical;
}
.input--textarea-tall {
	height: 50vh;
	min-height: 50px;
	max-height: 80vh;
	resize: vertical;
}
.input--code {
	width: calc(100% - 16px);
	padding: 6px;
	border-color: #212127;
	background: #404051;
	color: #eeeeae;
	font: 11px/1.3 monospace;
	scrollbar-color: var(--background) var(--invert-background);
}
.input--small {
	width: 60px;
	text-align: center;
}
.input--search {
	width: 200px;
	max-width: calc(100% - 16px - 6px);
	padding: 3px 6px;
	margin: 0 6px 6px 0;
}

.range {
	width: calc(100% - 12px);
	margin: 0 8px 8px 0;
}



/* CONTENT */

.content {
	height: 100vh;
	opacity: 0;
	transition: opacity 200ms ease;
}
.content.is-loaded {
	opacity: 1;
}


/* Top Nav */

.top-nav {
	display: flex;
}

.top-nav__link {
	margin-right: 7.5px;
	border-radius: 20px;
	cursor: pointer;
	text-decoration: none;
}
.top-nav__link-inner {
	--bg: var(--invert-background);
	display: flex;
	gap: 9px;
	height: 30px;
	padding: 0 9px;
	background: var(--bg);
	border-radius: 20px;
	align-items: center;
	color: var(--accent-text);
	white-space: nowrap;
	transition: all 0.1s ease-out;
}
.top-nav__link:hover .top-nav__link-inner {
	background: color-mix(in hsl, var(--bg), var(--accent-box));
}
.top-nav__link:active .top-nav__link-inner {
	transform: scale(0.93);
}
.top-nav__link.has-selected .top-nav__link-inner {
	--bg: var(--accent);
}

.top-nav__icon {
	color: var(--accent-text);
	font-size: 24px;
}


/* Header */

.sitename {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 2em;
	margin: 0;
}

.sitename__link {
	display: flex;
	align-items: center;
	color: var(--text);
	text-decoration: none;
}
.sitename__link[href]:hover {
	color: var(--accent);
}

.sitename__logo {
	margin-right: 8px;
}

.title {
	margin: 0;
	font-size: 2em;
}

.sub-title {
	margin: 0;
	font-size: 1.25em;
}

.sub-sub-title {
	margin: 0;
	font-size: 1.25em;
	font-weight: normal;
}


/* Footer */

.footer__row {
	display: block;
	padding: 4px 0;
}
.footer__row--horizontal {
	display: flex;
	flex-direction: row;
	flex-flow: row wrap;
	justify-content: center;
	gap: 16px;
}
.footer__row--vertical {
	display: flex;
	flex-flow: column wrap;
	align-items: start;
	gap: 4px;
}

.footer__subtle-text {
	font-size: 0.9em;
}


/* Tags */

.tag-cloud {
	display: flex;
	width: 100%;
	flex-flow: row wrap;
	align-items: flex-start;
	margin-bottom: 4px;
}
.tag-cloud--center {
	justify-content: center;
	text-align: center;
}
.tag-cloud.is-hidden {
	display: none;
}

.tag-cloud__group {
	display: flex;
	flex-flow: row wrap;
}

.tag-cloud__blurb {
	font-size: 11px;
	display: block;
	width: 100%;
	flex: 0 0 auto;
	margin-bottom: 4px;
}

.tag-cloud__header {
	font-weight: bold;
	display: block;
	width: 100%;
	flex: 0 0 auto;
	margin-top: 8px;
	margin-bottom: 4px;
	text-align: left;
	text-indent: 8px;
}

.tag-cloud__tag {
	max-width: 100%;
	min-height: 24px;
	padding: 2px 8px;
	background: none;
	border: 2px solid var(--border-light);
	border-radius: 12px;
	margin-right: 4px;
	margin-bottom: 4px;
	flex: 0 0 auto;
	font: inherit;
	line-height: 16px;
	text-align: left;
	white-space: pre-wrap;
	cursor: pointer;
	transition-property: background-color, color, border-color;
	transition-duration: 0.1s;
	transition-timing-function: ease;
}
.tag-cloud__tag:hover {
	background: var(--box);
}
.tag-cloud__tag.is-selected {
	border-color: var(--accent);
	background: var(--accent);
	color: var(--accent-text);
}
.tag-cloud__tag.is-disabled {
	opacity: 0.5;
	pointer-events: none;
}

.tag-cloud__count {
	display: inline-block;
	min-width: 16px;
	padding: 0 4px;
	height: 16px;
	background: var(--box);
	border-radius: 8px;
	margin: 0 -4px 0 4px;
	text-align: center;
	font-weight: 700;
	transition: inherit;
}
.tag-cloud__tag.is-selected .tag-cloud__count {
	background: var(--accent);
}



/* LOADER */

.loading-screen {
	position: fixed;
	top: 0;
	left: 0;
	bottom: 0;
	right: 0;
	z-index: 999;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	background: var(--background);
	animation: 500ms ease 500ms both loader-fade-in;
	transition: transform 0.4s ease;
}
.loading-screen.is-hidden {
	transform: translateY(100%);
}

@keyframes loader-fade-in {
	from {
		opacity: 0;
	} to {
		opacity: 1;
	}
}

.loading-screen__info-area {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: center;
	max-width: 500px;
	min-height: 124px;
	padding: 8px 0 0 140px;
}
.loading-screen__link-area {
	display: flex;
	height: calc(8px + 1.3em);
	padding-top: 8px;
	gap: 16px;
	box-sizing: border-box;
	overflow: hidden;
	transition: height 0.8s ease;
}
.loading-screen__link-area.is-hidden {
	height: 0;
}

.loading-screen__icon {
	position: absolute;
	top: 0;
	left: 0;
}
.loading-screen__icon::before,
.loading-screen__icon::after {
	content: "";
	position: absolute;
	background: var(--text);
	border-radius: 99px;
}


.loading-screen__spinner {
	width: 114px;
	height: 114px;
	margin: 5px;
	border: 12px solid #0002;
	border-top-color: var(--text);
	border-left-color: var(--text);
	border-radius: 50%;
	animation: 1s cubic-bezier(.55,.47,.47,.63) 0s infinite loader-spin;
}
.loading-screen__spinner::before,
.loading-screen__spinner::after {
	width: 12px;
	height: 12px;
}
.loading-screen__spinner::before {
	right: 3px;
	top: 3px;
}
.loading-screen__spinner::after {
	left: 3px;
	bottom: 3px;
}

.loading-screen__cross {
	width: 124px;
	height: 124px;
	overflow: hidden;
}
.loading-screen__cross::before,
.loading-screen__cross::after {
	top: calc(50% - 6px);
	left: 0;
	width: 100%;
	height: 12px;
}
.loading-screen__cross::before {
	transform: rotate(45deg);
}
.loading-screen__cross::after {
	transform: rotate(-45deg);
}

@keyframes loader-spin {
	from {
		transform: rotate(30deg);
	} to {
		transform: rotate(390deg);
	}
}

.loading-screen__text {
	font-size: 20px;
	white-space: nowrap;
}

.loading-screen__subtext {
	margin-top: 6px;
	opacity: 0.65;
	font-size: 14px;
	font-style: italic;
}

.loading-screen__console {
	margin-top: 8px;
	width: 500px;
	background: #404051;
	border-radius: 10px;
	color: #eee;
	overflow: hidden;
}
.loading-screen__console.is-hidden {
	display: none;
}

.loading-screen__console-header {
	display: flex;
	padding: 3px 10px;
	background: var(--invert-background);
	justify-content: space-between;
	align-items: center;
	color: var(--background);
}
.loading-screen__console-button {
	margin: 0;
}

.loading-screen__message-boxes {
	max-height: 300px;
	padding: 10px;
	font: 10px/1.3 monospace;
	overflow-y: auto;
}

.loading-screen__message ~ .loading-screen__message {
	padding-top: 3px;
	border-top: 1px dotted var(--border-heavy);
	margin-top: 3px;
}

.loading-screen__message-timestamp {
	display: inline-block;
	width: 8ch;
	text-align: right;
	white-space: pre;
	opacity: 0.4;
}

.loading-screen__message-quote {
	display: block;
	padding: .5ch 1ch;
	background: color-mix(in srgb, var(--invert-background), transparent 40%);
	border-radius: 3px;
	margin: .5ch 1ch;
}



/* Table */

.table {
	border-collapse: collapse;
	margin: 6px 0;
}

.table td {
	padding: 2px;
	border: 1px solid var(--border-heavy);
}

.table__label-cell {
	font-weight: bold;
	white-space: nowrap;
}



/* MESSENGER */

.messenger {
	position: fixed;
	top: 8px;
	bottom: 8px;
	right: 8px;
	z-index: 999;
	display: flex;
	width: 332px;
	padding: 16px 16px 32px;
	flex-flow: column;
	justify-content: flex-end;
	pointer-events: none;
	transition: opacity 0.3s ease;
}
.messenger:hover {
	pointer-events: auto;
}
.messenger.is-hidden {
	opacity: 0;
}

.messenger__show-button {
	position: absolute;
	bottom: 16px;
	right: 16px;
	left: 16px;
	height: 6px;
	background: rgb(255,255,255,0.5);
	box-shadow: 1px 1px 5px rgba(0,0,0,0.45);
	border-radius: 3px;
	pointer-events: auto;
	cursor: help;
}
.messenger.is-hidden .messenger__show-button {
	pointer-events: none;
}

.messenger__message {
	--message-accent: var(--background);
	background: var(--background);
	border-left: 4px solid var(--message-accent);
	padding: 8px;
	border-radius: 4px;
	box-shadow: 1px 1px 5px 1px rgba(0,0,0,0.75);
	margin-top: 8px;
	opacity: 0;
	transition: opacity 0.3s ease;
	animation:
		pop-in 400ms ease 0ms backwards,
		pop-out 1400ms ease 8600ms backwards;
}
.messenger:hover .messenger__message {
	opacity: 1;
	pointer-events: auto;
}
.messenger__message--highlighted {
	--message-accent: var(--accent);
}
.messenger__message--error {
	--message-accent: var(--accent--error);
}
.messenger__message--warning {
	--message-accent: var(--accent--warn);
}
.messenger__message.is-visible {
	opacity: 1;
}
@keyframes pop-in {
	from {
		transform: translateY(30px);
	}
	to {
		transform: translateY(0);
		opacity: 1;
	}
}

.messenger__message-header {
	display: block;
	margin-bottom: 6px;
	font-weight: bold;
}

.messenger__message-subtext {
	display: block;
	margin-top: 6px;
	font-size: 0.9em;
	font-style: italic;
	opacity: 0.65;
}



/* MODALS */

.popup {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 10;
	overflow: auto;
	background: rgba(0,0,0,0.6);
}
.popup.is-hidden {
	display: none;
}
.popup__inner {
	position: relative;
	display: flex;
	padding: 80px 30px;
	min-height: 100%;
	flex-direction: column;
	align-items: center;
}
.popup__invisibutton {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	cursor: pointer;
}
.popup__content {
	position: relative;
	z-index: 1;
	width: 600px;
	max-width: 100%;
	padding: 16px;
	background: var(--background);
	border-radius: 8px;
	flex: 0 0 auto;
	box-shadow: 0 4px 32px rgba(0,0,0,0.4);
}
.popup__content--narrow {
	width: 400px;
}
.popup__content--wide {
	width: 800px;
}

.popup__section {
	padding: 0 6px;
	border-radius: 6px;
	border: 2px solid var(--border-light);
}
.popup__section + .popup__section {
	margin-top: 12px;
}

.popup__header {
	display: block;
	padding-bottom: 4px;
	border-bottom: 2px dotted var(--border-heavy);
	margin: 0 0 8px;
	font-size: 1.2em;
	font-weight: 700;
}

.popup__sub-header {
	display: block;
	margin: 8px 0;
	font-size: 1.1em;
	font-weight: 700;
}

.popup__paragraph {
	margin: 0 0 8px;
}

.popup__image {
	max-width: 100%;
	height: auto;
	max-height: 70vh;
	border: 2px dotted var(--border-light);
	border-radius: 8px;
	margin-bottom: 8px;
}

.popup__image--thumb {
	max-width: 33%;
	max-height: 180px;
}

.popup__image--expand {
	position: relative;
	z-index: 5;
	transition: transform 0.4s ease;
	transform-origin: left top;
}
.popup__image--expand:hover {
	transform: scale(3) translateY(-5%);
	border-color: transparent;
}

.popup__button {
	margin-top: 6px;
}



/* Dynamic Popups */

.dynamic-popup {
	position: fixed;
	z-index: 15;
	width: 270px;
	padding: 8px;
	background: var(--background);
	border: 2px solid var(--border-light);
	border-radius: 4px;
	box-shadow: 2px 3px 6px rgba(0,0,0,0.3);
	color: var(--text);
	opacity: 0;
	transition: opacity 0.1s ease;
	pointer-events: none;
}
.dynamic-popup.is-visible {
	opacity: 1;
}

/* decorative arrow */
.dynamic-popup::before,
.dynamic-popup::after {
	content: "";
	position: absolute;
	border-style: solid;
	border-color: transparent;
	pointer-events: none;
}
.dynamic-popup::before {
	border-width: 10px;
}
.dynamic-popup::after {
	border-width: 6px;
}

.dynamic-popup.left::before {
	right: 100%;
	top: calc(50% - 10px);
	border-right-color: var(--border-light);
}
.dynamic-popup.left::after {
	right: 100%;
	top: calc(50% - 6px);
	border-right-color: var(--background);
}

.dynamic-popup.right::before {
	left: 100%;
	top: calc(50% - 10px);
	border-left-color: var(--border-light);
}
.dynamic-popup.right::after {
	left: 100%;
	top: calc(50% - 6px);
	border-left-color: var(--background);
}

.dynamic-popup.top::before {
	left: calc(50% - 10px);
	bottom: 100%;
	border-bottom-color: var(--border-light);
}
.dynamic-popup.top::after {
	left: calc(50% - 6px);
	bottom: 100%;
	border-bottom-color: var(--background);
}

.dynamic-popup.bottom::before {
	left: calc(50% - 10px);
	top: 100%;
	border-top-color: var(--border-light);
}
.dynamic-popup.bottom::after {
	left: calc(50% - 6px);
	top: 100%;
	border-top-color: var(--background);
}



/* Tutorial */

.tutorial {
	position: fixed;
	inset: 0;
	z-index: 14;
	background: rgba(0,0,0,0.6);
	transition: opacity .5s ease;
	cursor: default;
}
.tutorial.is-hidden {
	opacity: 0;
	pointer-events: none;
}

.tutorial__info {
	position: fixed;
	left: 50%;
	bottom: 24px;
	width: 80%;
	max-width: 400px;
	background: var(--background);
	border-radius: 8px;
	box-shadow: 0 2px 6px #0008;
	padding: 8px;
	transform: translate(-50%, var(--offset,0px));
	transition: opacity .5s ease, transform .25s ease;
}

.tutorial__split {
	display: flex;
	justify-content: space-between;
	margin-bottom: 4px;
}

.tutorial__progress {
	height: 4px;
	background: linear-gradient(to right, var(--accent) var(--progress, 0%), var(--border-light) 0);
	border-radius: 2px;
}

.tutorial__welcome {
	height: var(--height);
	margin-top: 4px;
	overflow: hidden;
	transition: height .25s ease;
}
.tutorial__welcome.is-hidden {
	height: 0;
	margin-top: 0;
}



/* OVERRIDES */

.o-hidden {
	display: none !important;
}

.o-clear {
	clear: both;
}

.o-pre-wrap {
	white-space: pre-wrap;
}