@import 'typography.css';

/* 
When rendering standalone, we have a body.foo and it contains the asciidoc content.
When rendering from Svelte, we have a body (without .foo), then a div.foo, which contains the asciidoc content
This combination of selectors applies the right styles in the right places for both rendering paths.
*/

body {
	background-color: #101010;
	color: #e0e0e0;
	font-family: 'Nunito';
	font-weight: 500;
}

body.inventory,
body div.inventory,
body.systems,
body div.systems {
	margin: 2rem auto;
	max-width: 800px;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 12px;
	padding: 2rem;

	h1 {
		margin: 0;
		padding: 0;
		line-height: 1;
	}

	h2 {
		height: round(up, 2rem, 1px);
		border-top: round(up, 0.5rem, 1px) solid #101010;
		margin-top: 1.5rem;
		margin-bottom: 1rem;
		position: sticky;
		top: 0;
		width: 100%;
		background: #151515;
		border-bottom: 1px solid #2c2c2c;
		padding-left: 0;
		z-index: 10;
	}

	h3 {
		height: round(up, 1.6rem, 1px);
		border-top: round(up, 0.5rem, 1px) solid #101010;
		margin-top: 1.1rem;
		margin-bottom: 0.8rem;
		position: sticky;
		top: round(up, 2.5rem, 1px);
		width: 100%;
		background: #1a1a1a;
		border-bottom: 1px solid #2c2c2c;
		padding-left: 0;
		z-index: 9;
	}

	h4 {
		height: round(up, 1.3rem, 1px);
		border-top: round(up, 0.5rem, 1px) solid #101010;
		margin-top: 0.975rem;
		margin-bottom: 0.5rem;
		position: sticky;
		top: round(up, 4.6rem, 1px);
		width: 100%;
		background: #1f1f1f;
		border-bottom: 1px solid #2a2a2a;
		padding-left: 0;
		z-index: 8;
	}
}

#content {
	width: 100%;
}

#header {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	margin-bottom: 1.5rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	padding-bottom: 0.5rem;
}

h1 {
	font-size: 2.5rem;
	font-family: 'Alegreya';
	font-weight: 700;
	color: #fff;
}

h2 {
	font-family: 'Alegreya';
	font-weight: 500;
}

h3 {
	font-size: 1.4rem;
	font-weight: 500;
	color: #ddd;
	font-family: 'Alegreya';
}

h4 {
	font-size: 1.1rem;
	font-weight: 500;
	color: #ccc;
	font-family: 'Alegreya';
}

h1 a,
h2 a,
h3 a,
h4 a {
	color: inherit;
	text-decoration: none;
}
