:root {
	color-scheme: dark;
	--bg: #04070a;
	--bg-panel: #08110e;
	--bg-panel-soft: #0c1814;
	--border: #1f4a35;
	--border-strong: #2dbb73;
	--neon: #4dff9a;
	--neon-dim: #6e9282;
	--neon-bright: #b6ffd6;
	--neon-red: #ff4f6e;
	--neon-red-soft: #3a0d18;
	--neon-blue: #3aaaff;
	--neon-blue-soft: #0a1f33;
	--warn: #ffd166;
	--error: #ff4f6e;
	--text: #c7f0d8;
	--mono: "JetBrains Mono", "Fira Code", "SFMono-Regular", "Menlo", "Consolas", ui-monospace, monospace;
}

* {
	box-sizing: border-box;
}

html, body {
	margin: 0;
	padding: 0;
	min-height: 100vh;
	background: radial-gradient(circle at top, #061110 0%, #04070a 60%, #02050a 100%);
	color: var(--text);
	font-family: var(--mono);
	font-size: 14px;
	line-height: 1.4;
}

/* Subtle scanlines */
body::before {
	content: "";
	pointer-events: none;
	position: fixed;
	inset: 0;
	background:
		repeating-linear-gradient(
			to bottom,
			rgba(77, 255, 154, 0.025) 0,
			rgba(77, 255, 154, 0.025) 1px,
			transparent 1px,
			transparent 3px
		);
	z-index: 1000;
}

h1, h2, h3 {
	color: var(--neon-bright);
	text-shadow: 0 0 6px rgba(77, 255, 154, 0.55);
	letter-spacing: 0.04em;
	text-transform: uppercase;
	margin: 0 0 0.75rem;
}

h1 { font-size: 1.15rem; }
h2 { font-size: 0.95rem; }
h3 { font-size: 0.85rem; }

p { margin: 0 0 0.6rem; }

a, a:visited {
	color: var(--neon);
	text-shadow: 0 0 4px rgba(77, 255, 154, 0.45);
	text-decoration: none;
	border-bottom: 1px dashed rgba(77, 255, 154, 0.4);
}

a:hover {
	color: var(--neon-bright);
	border-bottom-color: var(--neon-bright);
}

strong { color: var(--neon-bright); }

/* ---- Landing card ---- */

.landing-shell {
	min-height: 100vh;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 2rem;
	overflow-y: auto;
}

.hero-card {
	position: relative;
	/* Auto margins centre a short card vertically, but collapse for a tall card so its
	   top stays reachable and the page scrolls instead of clipping. */
	margin: auto;
	max-width: 720px;
	width: 100%;
	padding: 2rem 2.5rem;
	background: linear-gradient(180deg, rgba(8, 17, 14, 0.95), rgba(4, 7, 10, 0.85));
	border: 1px solid var(--border);
	box-shadow:
		0 0 0 1px rgba(77, 255, 154, 0.08) inset,
		0 0 24px rgba(77, 255, 154, 0.12);
}

.hero-card::before,
.hero-card::after,
.panel::before,
.panel::after {
	content: "";
	position: absolute;
	width: 14px;
	height: 14px;
	border-color: var(--neon);
	border-style: solid;
}

.hero-card::before { top: -1px; left: -1px; border-width: 1px 0 0 1px; }
.hero-card::after  { top: -1px; right: -1px; border-width: 1px 1px 0 0; }

.lead {
	font-size: 0.95rem;
	color: var(--neon-dim);
}

/* ---- Buttons & links acting as buttons ---- */

.primary-link,
.secondary-link,
button,
input[type="submit"] {
	display: inline-block;
	padding: 0.45rem 0.95rem;
	margin-right: 0.5rem;
	margin-top: 0.3rem;
	font-family: var(--mono);
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	text-decoration: none;
	border-radius: 0;
	cursor: pointer;
	transition: background 80ms linear, color 80ms linear, box-shadow 80ms linear;
}

.primary-link {
	color: #04070a;
	background: var(--neon);
	border: 1px solid var(--neon);
	box-shadow: 0 0 12px rgba(77, 255, 154, 0.55);
}

.primary-link:hover {
	background: var(--neon-bright);
	border-color: var(--neon-bright);
	box-shadow: 0 0 18px rgba(182, 255, 214, 0.75);
}

.secondary-link {
	color: var(--neon);
	background: transparent;
	border: 1px solid var(--border-strong);
	box-shadow: inset 0 0 0 1px rgba(45, 187, 115, 0.15);
}

.secondary-link:hover {
	color: var(--neon-bright);
	border-color: var(--neon);
	box-shadow: 0 0 10px rgba(77, 255, 154, 0.35);
}

/* ---- Topbar ---- */

.topbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.75rem 1.25rem;
	border-bottom: 1px solid var(--border);
	background: linear-gradient(90deg, rgba(8, 17, 14, 0.95), rgba(4, 7, 10, 0.7));
	text-shadow: 0 0 6px rgba(77, 255, 154, 0.4);
}

.topbar h1 {
	margin: 0;
	font-size: 0.95rem;
}

.topbar-actions {
	display: flex;
	gap: 1rem;
	align-items: center;
	font-size: 0.85rem;
}

.topbar-status {
	font-family: "JetBrains Mono", "Fira Code", "SFMono-Regular", "Menlo", "Consolas", ui-monospace, monospace;
	font-size: 0.8rem;
	color: rgba(199, 240, 216, 0.75);
	font-variant-numeric: tabular-nums;
}

.topbar-red {
	border-bottom-color: var(--neon-red);
	background: linear-gradient(90deg, var(--neon-red-soft), rgba(4, 7, 10, 0.7));
}

.topbar-red h1 {
	color: #ffd6dd;
	text-shadow: 0 0 8px rgba(255, 79, 110, 0.7);
}

.topbar-blue {
	border-bottom-color: var(--neon-blue);
	background: linear-gradient(90deg, var(--neon-blue-soft), rgba(4, 7, 10, 0.7));
}

.topbar-blue h1 {
	color: #d6ecff;
	text-shadow: 0 0 8px rgba(58, 170, 255, 0.7);
}

/* ---- Layout grids ---- */

.dashboard,
.console {
	padding: 1.25rem;
	display: grid;
	gap: 1.25rem;
}

.console {
	grid-template-columns: 1fr;
}

@media (min-width: 1100px) {
	.console {
		grid-template-columns: 2fr 1fr;
	}
	.console-actions, .console-intel, .console-siem {
		grid-column: 1 / -1;
	}
}

.dashboard section,
.console section,
.panel {
	position: relative;
	padding: 1rem 1.1rem 1.1rem;
	background: var(--bg-panel);
	border: 1px solid var(--border);
	box-shadow:
		inset 0 0 0 1px rgba(77, 255, 154, 0.04),
		0 0 14px rgba(77, 255, 154, 0.06);
}

.dashboard section::before,
.console section::before,
.panel::before {
	content: "";
	position: absolute;
	top: -1px; left: -1px;
	width: 12px; height: 12px;
	border-top: 1px solid var(--neon);
	border-left: 1px solid var(--neon);
}

.dashboard section::after,
.console section::after,
.panel::after {
	content: "";
	position: absolute;
	bottom: -1px; right: -1px;
	width: 12px; height: 12px;
	border-bottom: 1px solid var(--neon);
	border-right: 1px solid var(--neon);
}

.console-red {
	background:
		linear-gradient(180deg, rgba(58, 13, 24, 0.18), transparent 200px),
		radial-gradient(circle at top, #061110 0%, #04070a 60%, #02050a 100%);
}

.console-blue {
	background:
		linear-gradient(180deg, rgba(10, 31, 51, 0.18), transparent 200px),
		radial-gradient(circle at top, #061110 0%, #04070a 60%, #02050a 100%);
}

.console-header p {
	font-size: 0.95rem;
	color: var(--neon-bright);
}

/* ---- Tables ---- */

table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.85rem;
}

thead th {
	font-size: 0.7rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--neon);
	border-bottom: 1px solid var(--border-strong);
	padding: 0.4rem 0.6rem;
	text-align: left;
}

tbody td {
	padding: 0.35rem 0.6rem;
	border-bottom: 1px solid rgba(31, 74, 53, 0.6);
	color: var(--text);
}

tbody tr:hover td {
	background: rgba(77, 255, 154, 0.05);
	color: var(--neon-bright);
}

/* ---- SIEM feed ---- */

.siem-feed {
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: 0.8rem;
	max-height: 360px;
	overflow-y: auto;
	background: #02060a;
	border: 1px solid var(--border);
	padding: 0.5rem 0.75rem;
}

.siem-feed li {
	padding: 0.2rem 0;
	border-bottom: 1px dashed rgba(31, 74, 53, 0.5);
	white-space: pre-wrap;
}

.siem-feed li:last-child {
	border-bottom: none;
}

.siem-INFO { color: var(--neon-dim); }
.siem-WARN { color: var(--warn); text-shadow: 0 0 4px rgba(255, 209, 102, 0.5); }
.siem-ERROR {
	color: var(--neon-red);
	font-weight: 600;
	text-shadow: 0 0 5px rgba(255, 79, 110, 0.6);
}

.siem-visibility {
	color: var(--neon-dim);
	font-style: italic;
	margin-left: 0.5rem;
}

/* ---- Lists ---- */

ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.dashboard ul li,
.console ul li {
	padding: 0.25rem 0;
	border-bottom: 1px dashed rgba(31, 74, 53, 0.6);
}

.dashboard ul li::before,
.console ul li::before {
	content: ">> ";
	color: var(--neon);
}

/* ---- Forms ---- */

.form-row {
	display: flex;
	gap: 0.75rem;
	align-items: center;
	margin-bottom: 0.5rem;
}

.form-row label {
	min-width: 140px;
	color: var(--neon-dim);
	font-size: 0.75rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

input[type="text"],
input[type="number"],
select,
textarea {
	background: #02060a;
	color: var(--neon-bright);
	border: 1px solid var(--border);
	font-family: var(--mono);
	font-size: 0.85rem;
	padding: 0.35rem 0.5rem;
	outline: none;
	caret-color: var(--neon);
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
	border-color: var(--neon);
	box-shadow: 0 0 6px rgba(77, 255, 154, 0.45);
}

select option {
	background: #02060a;
	color: var(--neon-bright);
}

/* ---- Scrollbar polish for WebKit ---- */

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-panel); }
::-webkit-scrollbar-thumb {
	background: var(--border-strong);
	box-shadow: 0 0 6px rgba(77, 255, 154, 0.4);
}

/* ---- Cursor-style blinking accent for header ---- */

.topbar h1::after {
	content: "_";
	margin-left: 0.4rem;
	color: var(--neon);
	animation: blink 1.1s steps(2, end) infinite;
}

@keyframes blink {
	50% { opacity: 0; }
}

/* Console layout: topbar on top, terminal flexes, events panel pinned at the bottom */
html, body { height: 100%; }
body { display: flex; flex-direction: column; }
.topbar { flex: 0 0 auto; }
.terminal-shell {
	display: flex;
	flex-direction: column;
	flex: 0 0 auto;
	height: 70vh;
	min-height: 340px;
	overflow: hidden;
	resize: vertical;
	padding: 0;
}
.terminal-pane {
	flex: 1 1 auto;
	min-height: 0;
	overflow: hidden;
	background: #04070a;
	position: relative;
}
.terminal-pane > .tv-tab-view {
	position: absolute;
	inset: 0;
	visibility: hidden;
	pointer-events: none;
}
.terminal-pane > .tv-tab-view.is-active {
	visibility: visible;
	pointer-events: auto;
}
.tv-tab-view .terminal.xterm {
	width: 100%;
	height: 100%;
}
.tv-tab-view .xterm-viewport,
.tv-tab-view .xterm-screen {
	width: 100% !important;
}
.tab-bar {
	flex: 0 0 auto;
	display: flex;
	align-items: stretch;
	gap: 2px;
	padding: 4px 6px 0;
	background: #050a0d;
	border-bottom: 1px solid rgba(77, 255, 154, 0.25);
	font-family: "JetBrains Mono", "Fira Code", "SFMono-Regular", "Menlo", "Consolas", ui-monospace, monospace;
	font-size: 12px;
	min-height: 26px;
	overflow-x: auto;
	scrollbar-width: thin;
	scrollbar-color: rgba(77, 255, 154, 0.4) transparent;
}
.tab-bar .tab {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 2px 8px;
	background: rgba(77, 255, 154, 0.06);
	border: 1px solid rgba(77, 255, 154, 0.18);
	border-bottom: none;
	border-radius: 4px 4px 0 0;
	color: rgba(199, 240, 216, 0.7);
	cursor: pointer;
	white-space: nowrap;
	user-select: none;
}
.tab-bar .tab:hover {
	background: rgba(77, 255, 154, 0.12);
	color: #c7f0d8;
}
.tab-bar .tab.is-active {
	background: #04070a;
	color: #4dff9a;
	border-color: rgba(77, 255, 154, 0.55);
}
.tab-bar .tab-label {
	font-variant-numeric: tabular-nums;
}
.tab-bar .tab-close {
	background: none;
	border: none;
	color: inherit;
	font: inherit;
	cursor: pointer;
	padding: 0 2px;
	opacity: 0.55;
}
.tab-bar .tab-close:hover {
	opacity: 1;
	color: #ff7373;
}
.tab-bar .tab-add {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	padding: 2px 6px;
	background: transparent;
	border: 1px dashed rgba(77, 255, 154, 0.3);
	border-radius: 4px;
	color: rgba(199, 240, 216, 0.7);
	cursor: pointer;
	font: inherit;
}
.tab-bar .tab-add:hover {
	border-style: solid;
	color: #4dff9a;
}
.events-pane {
	flex: 0 0 110px;
	height: 110px;
	min-height: 0;
	display: flex;
	flex-direction: column;
	background: #050a0d;
	border-top: 1px solid rgba(77, 255, 154, 0.25);
	color: var(--text);
	font-family: "JetBrains Mono", "Fira Code", "SFMono-Regular", "Menlo", "Consolas", ui-monospace, monospace;
	font-size: 11px;
}
.events-header {
	flex: 0 0 auto;
	padding: 2px 10px;
	font-size: 10px;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: rgba(199, 240, 216, 0.6);
	border-bottom: 1px solid rgba(77, 255, 154, 0.15);
	background: linear-gradient(180deg, rgba(77, 255, 154, 0.08), transparent);
}
.events-list {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	margin: 0;
	padding: 4px 10px;
	list-style: none;
	font-variant-numeric: tabular-nums;
	scrollbar-width: thin;
	scrollbar-color: rgba(77, 255, 154, 0.4) transparent;
	line-height: 1.3;
}
.events-list li {
	padding: 0;
	white-space: pre-wrap;
	color: #c7f0d8;
}
.events-list li.evt-ok { color: #4dff9a; }
.events-list li.evt-warn { color: #f3d169; }
.events-list li.evt-error { color: #ff7373; }
.events-list li.evt-info { color: #8ed1ad; }
.events-list li time { color: rgba(199, 240, 216, 0.45); margin-right: 8px; }

/* ---- Network topology ---- */

.topology-canvas {
	overflow: auto;
	height: 480px;
	min-height: 160px;
	resize: vertical;
	background: #02060a;
	border: 1px solid var(--border);
	padding: 0.5rem;
}

.topology-svg {
	max-width: 100%;
	height: auto;
}

.topology-empty {
	color: var(--neon-dim);
	font-style: italic;
}

.topo-node {
	fill: rgba(12, 24, 20, 0.92);
	stroke: var(--border-strong);
	stroke-width: 1;
}

.topo-node.topo-internet {
	fill: rgba(58, 170, 255, 0.14);
	stroke: var(--neon-blue);
}

.topo-node-label {
	fill: var(--neon);
	font-family: var(--mono);
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.topo-host-label {
	fill: var(--text);
	font-family: var(--mono);
	font-size: 10px;
}

.topo-device-label {
	fill: var(--neon-dim);
	font-family: var(--mono);
	font-size: 9px;
}

.topo-edge-tree {
	stroke: var(--neon-dim);
	stroke-width: 1.5;
	opacity: 0.85;
}

.topo-edge-cross {
	stroke: var(--neon-dim);
	stroke-width: 1.2;
	stroke-dasharray: 4 3;
	opacity: 0.4;
}

.topo-arrow {
	fill: var(--neon-dim);
}

/* Node icons are stroked with currentColor, so colour conveys kind and compromise. */
.topo-icon { color: var(--neon); }

.topo-kind-ROUTER { color: var(--neon-blue); }
.topo-kind-FIREWALL { color: var(--neon-red); }
.topo-kind-VPN_GATEWAY { color: #b07cff; }
.topo-kind-SWITCH { color: #66ffdd; }
.topo-kind-LOAD_BALANCER { color: #4dd0e1; }
.topo-kind-IDS_IPS { color: var(--warn); }
.topo-kind-WIRELESS_AP { color: #99eeff; }
.topo-kind-UNKNOWN { color: var(--neon-dim); }

/* Compromise state overrides the kind colour (declared after, equal specificity). */
.topo-icon.topo-FOOTHOLD { color: var(--warn); }
.topo-icon.topo-ROOT { color: var(--neon-red); }

/* ---- Scenario catalogue master-detail ---- */

.scenario-master-detail {
	display: flex;
	gap: 1rem;
	align-items: flex-start;
}

.scenario-sidebar {
	flex: 0 0 220px;
	display: flex;
	flex-direction: column;
	border-right: 1px solid var(--border);
}

.scenario-sidebar a {
	padding: 0.5rem 0.75rem;
	color: var(--neon-dim);
	text-decoration: none;
	border-left: 2px solid transparent;
}

.scenario-sidebar a.active {
	color: var(--neon);
	border-left-color: var(--neon);
	background: rgba(77, 255, 154, 0.06);
}

.scenario-detail {
	flex: 1 1 auto;
	min-width: 0;
}

.topology-panel {
	flex: 0 0 auto;
	border-bottom: 1px solid rgba(77, 255, 154, 0.25);
	background: #050a0d;
}

.topology-panel > summary {
	padding: 0.4rem 1rem;
	cursor: pointer;
	color: var(--neon);
	font-size: 0.8rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.topology-panel[open] > summary {
	border-bottom: 1px solid rgba(77, 255, 154, 0.15);
}

.topology-panel .topology-canvas {
	height: 320px;
	border: none;
}

.objectives-panel {
	border-bottom: 1px solid rgba(77, 255, 154, 0.15);
	padding: 0.25rem 0.75rem;
}

.objectives-list {
	list-style: none;
	margin: 0.25rem 0;
	padding: 0;
}

.objectives-list li {
	padding: 0.1rem 0;
}

.objective-mark {
	display: inline-block;
	width: 1.2rem;
	font-weight: bold;
}

.objective-done .objective-mark {
	color: #4dff9a;
}

.objective-open .objective-mark {
	color: #ff6b6b;
}

.objective-pts {
	opacity: 0.65;
}

.match-end-banner {
	background: #1b1f24;
	color: #ffd24d;
	border-bottom: 2px solid #ffd24d;
	padding: 0.5rem 1rem;
	font-weight: bold;
	text-align: center;
}

.match-end-banner a {
	color: #4dff9a;
	margin-left: 0.5rem;
}

.result-banner {
	padding: 0.75rem 1rem;
	border-left: 4px solid #888;
	margin-bottom: 1rem;
}

.result-banner.result-RED {
	border-left-color: #ff6b6b;
}

.result-banner.result-BLUE {
	border-left-color: #5b8cff;
}

.result-banner.result-DRAW {
	border-left-color: #ffd24d;
}

/* ---- Landing CRT hero ---- */

.hero-card.crt {
	animation: tv-flicker 5s steps(40) infinite;
}

.hero-card.crt > *:not(.crt-overlay) {
	position: relative;
	z-index: 3;
}

.crt-overlay {
	pointer-events: none;
	position: absolute;
	inset: 0;
	z-index: 2;
	overflow: hidden;
}

.crt-overlay::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	height: 22%;
	background: linear-gradient(
		to bottom,
		transparent 0,
		rgba(77, 255, 154, 0.10) 50%,
		transparent 100%);
	animation: tv-scan 6.5s linear infinite;
}

.tv-logo {
	font-family: "VT323", var(--mono);
	font-size: clamp(3rem, 13vw, 6rem);
	line-height: 0.9;
	letter-spacing: 0.05em;
	color: var(--neon-bright);
	text-shadow:
		0 0 6px rgba(77, 255, 154, 0.65),
		0 0 18px rgba(77, 255, 154, 0.45),
		0 0 42px rgba(45, 187, 115, 0.35);
	animation: tv-glow 3.2s ease-in-out infinite;
}

.tv-logo::after {
	content: "_";
	margin-left: 0.1em;
	color: var(--neon);
	animation: blink 1.1s steps(2, end) infinite;
}

@keyframes tv-scan {
	0% { transform: translateY(-120%); }
	100% { transform: translateY(560%); }
}

@keyframes tv-flicker {
	0%, 100% { opacity: 1; }
	7% { opacity: 0.97; }
	8% { opacity: 1; }
	52% { opacity: 0.985; }
	54% { opacity: 1; }
}

@keyframes tv-glow {
	0%, 100% {
		text-shadow:
			0 0 6px rgba(77, 255, 154, 0.65),
			0 0 18px rgba(77, 255, 154, 0.45),
			0 0 42px rgba(45, 187, 115, 0.35);
	}
	45% {
		text-shadow:
			0 0 4px rgba(77, 255, 154, 0.5),
			0 0 12px rgba(77, 255, 154, 0.3),
			0 0 28px rgba(45, 187, 115, 0.22);
	}
}

@media (prefers-reduced-motion: reduce) {
	.hero-card.crt,
	.tv-logo,
	.tv-logo::after {
		animation: none;
	}
	.crt-overlay {
		display: none;
	}
	.demo-cursor {
		animation: none;
	}
}

/* ---- Instructions page ---- */

.instructions-card {
	max-width: 920px;
	text-align: left;
}

.instructions-card h2 {
	margin-top: 1.6rem;
}

.landing-help {
	margin-top: 1.1rem;
}

.side-red { color: var(--neon-red); }
.side-blue { color: var(--neon-blue); }

.demo-tick {
	margin: 0.8rem 0 0.4rem;
	font-size: 0.8rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--neon-dim);
}

.demo-duo {
	display: flex;
	gap: 0.8rem;
	margin: 0.4rem 0;
	flex-wrap: wrap;
}

.demo-duo .demo-terminal {
	flex: 1 1 320px;
	min-width: 0;
	margin: 0;
}

.demo-terminal {
	margin: 0.8rem 0 0.4rem;
	border: 1px solid var(--border);
	background: #04070a;
	box-shadow: 0 0 18px rgba(77, 255, 154, 0.12) inset;
}

.demo-red { border-color: rgba(255, 79, 110, 0.45); }
.demo-blue { border-color: rgba(58, 170, 255, 0.45); }

.demo-red .demo-titlebar {
	background: linear-gradient(90deg, var(--neon-red-soft), #050a0d 70%);
	border-bottom-color: rgba(255, 79, 110, 0.35);
}

.demo-blue .demo-titlebar {
	background: linear-gradient(90deg, var(--neon-blue-soft), #050a0d 70%);
	border-bottom-color: rgba(58, 170, 255, 0.35);
}

.demo-red .demo-title { color: #ffd6dd; }
.demo-blue .demo-title { color: #cfe8ff; }

.demo-titlebar {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 10px;
	background: #050a0d;
	border-bottom: 1px solid rgba(77, 255, 154, 0.25);
}

.demo-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	opacity: 0.85;
}

.demo-dot-red { background: var(--neon-red); }
.demo-dot-warn { background: var(--warn); }
.demo-dot-ok { background: var(--neon); }

.demo-title {
	margin-left: 6px;
	font-size: 11px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: rgba(199, 240, 216, 0.6);
}

.demo-replay {
	margin-left: auto;
	margin-right: 0;
	margin-top: 0;
	padding: 2px 10px;
	font-size: 10px;
	letter-spacing: 0.12em;
	color: var(--neon);
	background: transparent;
	border: 1px solid var(--border-strong);
}

.demo-replay:hover {
	color: var(--neon-bright);
	border-color: var(--neon);
}

.demo-screen {
	height: 300px;
	overflow-y: auto;
	padding: 10px 14px;
	font-family: var(--mono);
	font-size: 13px;
	line-height: 1.5;
	color: var(--text);
	scrollbar-width: thin;
	scrollbar-color: rgba(77, 255, 154, 0.4) transparent;
}

.demo-line {
	white-space: pre-wrap;
	word-break: break-word;
}

.demo-prompt {
	color: var(--neon-bright);
	margin-top: 0.35rem;
}

.demo-sigil::before {
	content: var(--demo-prompt, "$ ");
	color: var(--neon);
}

.demo-cursor {
	display: inline-block;
	width: 0.55em;
	height: 1em;
	margin-left: 1px;
	vertical-align: text-bottom;
	background: var(--neon);
	animation: demo-blink 1s steps(2, start) infinite;
}

@keyframes demo-blink {
	50% { opacity: 0; }
}

.demo-divider {
	margin: 0.45rem 0 0.1rem;
	color: var(--neon-dim);
	opacity: 0.8;
}

.demo-ok { color: var(--neon); }
.demo-info { color: #8ed1ad; }
.demo-warn { color: var(--warn); }
.demo-error { color: #ff7373; }

/* ---- Command cheat sheet ---- */

.cheatsheet {
	width: 100%;
	border-collapse: collapse;
	margin-top: 0.4rem;
	font-size: 0.85rem;
}

.cheatsheet th,
.cheatsheet td {
	text-align: left;
	padding: 5px 10px;
	border-bottom: 1px solid var(--border);
	vertical-align: top;
}

.cheatsheet th {
	color: var(--neon-dim);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 0.75rem;
}

.cheatsheet code {
	color: var(--neon-bright);
	font-family: var(--mono);
}

.cheatsheet .cheat-group td {
	color: var(--neon);
	text-transform: uppercase;
	letter-spacing: 0.1em;
	font-size: 0.72rem;
	padding-top: 0.8rem;
	border-bottom: 1px solid var(--border-strong);
}
