:root {
	--green: #00ff41;
	--dim: #008f11;
	--glow: 0 0 6px rgba(0, 255, 65, .6);
	--bg: #000;
	--panel: rgba(0, 10, 2, .92);
	--warn: #ffd166;
	--err: #ff5f56;
}

* { box-sizing: border-box; }

html, body {
	margin: 0;
	height: 100%;
	background: var(--bg);
	color: var(--green);
	font: 15px/1.55 "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
}

#rain { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; opacity: .45; }

/* scanlines */
body::after {
	content: "";
	position: fixed; inset: 0; pointer-events: none; z-index: 2;
	background: repeating-linear-gradient(0deg, rgba(0,0,0,.18) 0 1px, transparent 1px 3px);
}

.term {
	position: relative; z-index: 1;
	display: flex; flex-direction: column;
	width: min(960px, calc(100% - 32px));
	height: min(90vh, 820px);
	margin: 5vh auto 0;
	background: var(--panel);
	border: 1px solid var(--dim);
	border-radius: 8px;
	box-shadow: 0 0 40px rgba(0, 255, 65, .15), inset 0 0 60px rgba(0, 255, 65, .04);
	backdrop-filter: blur(2px);
	overflow: hidden;
}

.term_bar {
	display: flex; align-items: center; gap: 8px;
	padding: 8px 12px;
	border-bottom: 1px solid var(--dim);
	background: rgba(0, 40, 8, .6);
}
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--dim); }
.dot:nth-child(1) { background: var(--err); }
.dot:nth-child(2) { background: var(--warn); }
.term_title { margin-left: auto; margin-right: auto; color: var(--dim); font-size: 13px; }

.profile {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px;
	padding: 14px 16px;
	border-bottom: 1px solid var(--dim);
}
.profile h1 { margin: 0; font-size: 22px; letter-spacing: .04em; color: #d6ffe0; text-shadow: var(--glow); }
.profile p { margin: 2px 0 0; font-size: 13px; color: var(--dim); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.actions a {
	padding: 6px 12px; border: 1px solid var(--green); border-radius: 4px;
	text-decoration: none; font-size: 13px; color: var(--green);
}
.actions a.primary { background: var(--green); color: #000; font-weight: 700; }
.actions a:hover, .actions a:focus-visible { background: #d6ffe0; color: #000; }

#cmd::placeholder { color: var(--dim); opacity: .7; }

.term_body { flex: 1; overflow-y: auto; padding: 16px; text-shadow: var(--glow); cursor: text; }
.term_body::-webkit-scrollbar { width: 8px; }
.term_body::-webkit-scrollbar-thumb { background: var(--dim); border-radius: 4px; }

#out > div { white-space: pre-wrap; word-break: break-word; }
#out ul { margin: .3em 0 .3em 1.2em !important; padding: 0; }
#out p { margin: .3em 0; }
#out strong, .hl { color: #b6ffc6; }
.muted { color: var(--dim); }
.warn { color: var(--warn); }
.err { color: var(--err); }
.ascii { font-size: clamp(5px, 1.45vw, 13px); line-height: 1.15; }

a { color: #b6ffc6; }
a:hover, a:focus-visible { background: var(--green); color: #000; text-shadow: none; outline: none; }

.line { display: flex; gap: .6em; align-items: baseline; }
.ps1 { color: var(--dim); white-space: nowrap; }
#cmd {
	flex: 1; min-width: 0;
	background: transparent; border: 0; outline: 0;
	color: var(--green); font: inherit; text-shadow: inherit;
	caret-color: var(--green);
}

.certs { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0; }
.certs figure { margin: 0; width: 120px; text-align: center; font-size: 11px; }
.certs img { width: 100%; }

.chips {
	display: flex; flex-wrap: wrap; gap: 6px;
	padding: 10px 12px;
	border-top: 1px solid var(--dim);
}
.chips button {
	background: transparent; color: var(--green);
	border: 1px solid var(--dim); border-radius: 4px;
	padding: 4px 10px; font: inherit; font-size: 13px; cursor: pointer;
}
.chips { align-items: center; }
.chips button:hover, .chips button:focus-visible { background: var(--green); color: #000; outline: none; }
.classic_link { margin-left: auto; font-size: 13px; color: var(--dim); }

.noscript { position: relative; z-index: 3; text-align: center; }

@media (max-width: 600px) {
	html, body { font-size: 13px; }
	.term { height: calc(100dvh - 32px); margin-top: 16px; }
	.term_title { display: none; }
	.profile h1 { font-size: 18px; }
	.chips { flex-wrap: nowrap; overflow-x: auto; }
	.chips button { flex: none; }
	#cmd::placeholder { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
	body::after { display: none; }
}
