/* LeetOS operator wiki – brand colours and fonts of leetos.gg, self-hosted, no CDN. */
@font-face {
	font-family: Anybody;
	src: url('/assets/fonts/anybody.woff2') format('woff2');
	font-weight: 100 900;
	font-stretch: 50% 150%;
	font-display: swap;
}
@font-face {
	font-family: 'Schibsted Grotesk';
	src: url('/assets/fonts/schibsted.woff2') format('woff2');
	font-weight: 400 900;
	font-display: swap;
}
@font-face {
	font-family: 'Spline Sans Mono';
	src: url('/assets/fonts/spline-mono.woff2') format('woff2');
	font-weight: 300 700;
	font-display: swap;
}

:root {
	--bg: #0b0b0e;
	--surface: #141418;
	--surface-2: #1d1d23;
	--line: #2a2a31;
	--ink: #f2efe9;
	--muted: #9a968e;
	--accent: #ff2e63;
	--accent-ink: #ff6d8f;
	--display: Anybody, system-ui, sans-serif;
	--text: 'Schibsted Grotesk', system-ui, sans-serif;
	--mono: 'Spline Sans Mono', ui-monospace, monospace;
	color-scheme: dark;
}

* {
	box-sizing: border-box;
}
html {
	scroll-padding-top: 5rem;
}
body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font: 16px/1.65 var(--text);
}
a {
	color: var(--accent-ink);
}
a:hover {
	color: var(--ink);
}

/* Header */
.top {
	position: sticky;
	top: 0;
	z-index: 10;
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 0.7rem 1.5rem;
	border-bottom: 1px solid var(--line);
	background: color-mix(in oklab, var(--bg) 88%, transparent);
	backdrop-filter: blur(10px);
}
.brand {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	color: var(--ink);
	text-decoration: none;
	font: 900 italic 1.25rem/1 var(--display);
	font-stretch: 120%;
	text-transform: uppercase;
}
.brand em {
	font-style: normal;
	font-size: 0.7rem;
	font-family: var(--mono);
	letter-spacing: 0.15em;
	padding: 0.2rem 0.45rem;
	border: 1px solid var(--accent);
	color: var(--accent-ink);
}
.search {
	position: relative;
	flex: 1;
	max-width: 28rem;
	margin-left: auto;
}
.search input {
	width: 100%;
	padding: 0.55rem 0.8rem;
	border: 1px solid var(--line);
	border-radius: 6px;
	background: var(--surface);
	color: var(--ink);
	font: inherit;
}
.search input:focus {
	outline: 2px solid var(--accent);
	outline-offset: 1px;
}
#hits {
	position: absolute;
	top: calc(100% + 0.4rem);
	left: 0;
	right: 0;
	margin: 0;
	padding: 0.3rem;
	list-style: none;
	border: 1px solid var(--line);
	border-radius: 6px;
	background: var(--surface);
	box-shadow: 0 18px 40px -18px #000;
}
#hits a {
	display: block;
	padding: 0.45rem 0.6rem;
	border-radius: 4px;
	color: var(--ink);
	text-decoration: none;
}
#hits a:hover {
	background: var(--surface-2);
}
#hits span {
	display: block;
	font-size: 0.75rem;
	color: var(--muted);
}
#hits .none {
	padding: 0.5rem;
	color: var(--muted);
}
.out {
	color: var(--muted);
	font-size: 0.85rem;
	text-decoration: none;
}
.menu {
	display: none;
	border: 1px solid var(--line);
	background: none;
	color: var(--ink);
	font-size: 1.2rem;
	padding: 0.2rem 0.6rem;
	border-radius: 6px;
}

/* Layout: navigation, article, "on this page" */
.wrap {
	display: grid;
	grid-template-columns: 16rem minmax(0, 1fr) 13rem;
	gap: 2.5rem;
	max-width: 84rem;
	margin: 0 auto;
	padding: 2rem 1.5rem 4rem;
}
.side {
	position: sticky;
	top: 5rem;
	align-self: start;
	max-height: calc(100vh - 6rem);
	overflow-y: auto;
	font-size: 0.92rem;
}
.side summary {
	cursor: pointer;
	padding: 0.5rem 0;
	font: 800 0.78rem/1.2 var(--mono);
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--muted);
}
.side ul {
	margin: 0 0 0.6rem;
	padding: 0;
	list-style: none;
	border-left: 1px solid var(--line);
}
.side a {
	display: block;
	padding: 0.3rem 0.8rem;
	margin-left: -1px;
	border-left: 2px solid transparent;
	color: var(--ink);
	text-decoration: none;
	opacity: 0.85;
}
.side a:hover {
	opacity: 1;
}
.side a[aria-current='page'] {
	border-left-color: var(--accent);
	color: var(--accent-ink);
	opacity: 1;
	font-weight: 700;
}
.toc {
	position: sticky;
	top: 5rem;
	align-self: start;
	font-size: 0.85rem;
}
.toc p {
	margin: 0 0 0.5rem;
	font: 800 0.72rem/1 var(--mono);
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--muted);
}
.toc ul {
	margin: 0;
	padding: 0;
	list-style: none;
}
.toc a {
	display: block;
	padding: 0.2rem 0;
	color: var(--muted);
	text-decoration: none;
}
.toc a:hover {
	color: var(--ink);
}

/* Article */
main {
	min-width: 0;
}
.crumb {
	margin: 0 0 0.5rem;
	font: 700 0.75rem/1 var(--mono);
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--muted);
}
.crumb a {
	color: var(--muted);
}
article h1 {
	margin: 0 0 0.6rem;
	font: 900 clamp(2.2rem, 5vw, 3.4rem) / 0.95 var(--display);
	font-stretch: 70%;
	text-transform: uppercase;
	overflow-wrap: break-word;
	hyphens: auto;
}
article h1::before {
	content: '';
	display: block;
	width: 2rem;
	height: 3px;
	margin-bottom: 0.9rem;
	background: var(--accent);
}
.lead {
	font-size: 1.15rem;
	color: var(--muted);
	margin: 0 0 2rem;
}
article h2 {
	margin: 2.4rem 0 0.8rem;
	padding-left: 0.65rem;
	border-left: 3px solid var(--accent);
	font: 800 1.45rem/1.15 var(--display);
	font-stretch: 85%;
	text-transform: uppercase;
}
article h3 {
	margin: 1.8rem 0 0.5rem;
	font-size: 1.1rem;
}
article ol,
article ul {
	padding-left: 1.4rem;
}
article li {
	margin: 0.3rem 0;
}
article ol {
	counter-reset: step;
	list-style: none;
	padding-left: 0;
}
article ol > li {
	counter-increment: step;
	position: relative;
	padding-left: 2.4rem;
	margin: 0.7rem 0;
}
article ol > li::before {
	content: counter(step);
	position: absolute;
	left: 0;
	top: 0.05rem;
	display: grid;
	place-items: center;
	width: 1.6rem;
	height: 1.6rem;
	border-radius: 50%;
	background: var(--accent);
	color: var(--bg);
	font: 800 0.8rem/1 var(--mono);
}
article code {
	padding: 0.1rem 0.35rem;
	border-radius: 4px;
	background: var(--surface-2);
	font: 0.88em var(--mono);
	overflow-wrap: anywhere;
}
article pre {
	overflow-x: auto;
	padding: 1rem;
	border: 1px solid var(--line);
	border-radius: 6px;
	background: #0d0f14;
}
article pre code {
	padding: 0;
	background: none;
}
article blockquote {
	margin: 1.2rem 0;
	padding: 0.8rem 1rem;
	border-left: 3px solid var(--accent);
	background: var(--surface);
	color: var(--ink);
}
article blockquote p {
	margin: 0;
}
article table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.92rem;
	display: block;
	overflow-x: auto;
}
article th,
article td {
	padding: 0.5rem 0.7rem;
	border-bottom: 1px solid var(--line);
	text-align: left;
	vertical-align: top;
}
article th {
	color: var(--muted);
	font: 700 0.75rem/1.2 var(--mono);
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
.shot {
	margin: 1.5rem 0;
}
.shot img {
	display: block;
	max-width: 100%;
	height: auto;
	border: 1px solid var(--line);
	border-radius: 8px;
	box-shadow: 0 20px 50px -30px #000;
}
.shot figcaption {
	margin-top: 0.45rem;
	font-size: 0.82rem;
	color: var(--muted);
}
.pager {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	margin-top: 3rem;
	padding-top: 1.2rem;
	border-top: 1px solid var(--line);
}
.pager a {
	text-decoration: none;
	font-weight: 700;
}

/* Start page */
.cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
	gap: 1rem;
}
.card {
	padding: 1.2rem 1.3rem;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--surface);
}
.card h2 {
	margin: 0 0 0.6rem;
	font: 800 1.1rem/1.1 var(--display);
	font-stretch: 85%;
	text-transform: uppercase;
	color: var(--accent-ink);
}
.card ul {
	margin: 0;
	padding: 0;
	list-style: none;
}
.card li {
	padding: 0.35rem 0;
	border-top: 1px solid var(--line);
}
.card li:first-child {
	border-top: 0;
}
.card li a {
	color: var(--ink);
	font-weight: 700;
	text-decoration: none;
}
.card li a:hover {
	color: var(--accent-ink);
}
.card li span {
	display: block;
	font-size: 0.82rem;
	color: var(--muted);
}
.foot {
	padding: 1.5rem;
	border-top: 1px solid var(--line);
	text-align: center;
	font-size: 0.85rem;
	color: var(--muted);
}

/* Narrow screens: navigation behind the menu button, no "on this page" column. */
@media (max-width: 70rem) {
	.wrap {
		grid-template-columns: 15rem minmax(0, 1fr);
	}
	.toc {
		display: none;
	}
}
@media (max-width: 52rem) {
	.wrap {
		grid-template-columns: minmax(0, 1fr);
		padding-top: 1.2rem;
	}
	.menu {
		display: block;
	}
	.out {
		display: none;
	}
	.side {
		display: none;
		position: static;
		max-height: none;
	}
	.nav-open .side {
		display: block;
	}
}
