/*
 * neslape.cz theme — taken over from viry.cz (/root/code/virycz-monitor, www/assets/style.css): a thin layer on top of
 * Bootstrap 5.3 (vendor/bootstrap.min.css), dark only, phosphor green on near-black, a faint grid and scanlines,
 * monospace headings and the radar in the brand. Only the parts this site uses; no build step, no JavaScript.
 */

:root,
[data-bs-theme='dark'] {
	/* Base: near-black with a green cast, not neutral grey. */
	--bs-body-bg: #05080a;
	--bs-body-bg-rgb: 5, 8, 10;
	--bs-body-color: #c6d3cc;
	--bs-body-color-rgb: 198, 211, 204;
	--bs-emphasis-color: #eafff2;
	--bs-secondary-color: rgba(198, 211, 204, 0.62);
	--bs-secondary-bg: #0b1014;
	--bs-tertiary-bg: #0e1418;
	--bs-border-color: #1c2b26;
	--bs-border-color-translucent: rgba(61, 220, 132, 0.14);

	/* Phosphor green: bright enough to glow, dark enough to read a paragraph in. */
	--bs-primary: #3ddc84;
	--bs-primary-rgb: 61, 220, 132;
	--bs-link-color: #4ee89a;
	--bs-link-color-rgb: 78, 232, 154;
	--bs-link-hover-color: #9dffc9;
	--bs-code-color: #7cf7b4;

	--bs-danger: #ff4d5e;
	--bs-danger-rgb: 255, 77, 94;
	--bs-warning: #ffb648;
	--bs-warning-rgb: 255, 182, 72;

	--bs-font-sans-serif: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	--bs-font-monospace: ui-monospace, 'JetBrains Mono', 'SFMono-Regular', Menlo, Consolas, 'Liberation Mono', monospace;
	--bs-border-radius: 3px;
	--bs-border-radius-sm: 2px;
	--bs-border-radius-lg: 4px;

	/* Theme-local variables, not Bootstrap's. */
	--viry-glow: 0 0 0.5rem rgba(61, 220, 132, 0.35);
	--viry-rule: rgba(61, 220, 132, 0.18);
	--viry-panel: #090e11;
}

html {
	color-scheme: dark;
}

/* a measure for reading, not the full width of a desktop screen */
.container {
	max-width: 66rem;
}


body {
	/* faint grid + a pool of light behind the header: a screen, not a sheet of paper */
	background-color: var(--bs-body-bg);
	background-image:
		radial-gradient(ellipse 80% 45% at 50% -10%, rgba(61, 220, 132, 0.09), transparent 70%),
		linear-gradient(rgba(61, 220, 132, 0.028) 1px, transparent 1px),
		linear-gradient(90deg, rgba(61, 220, 132, 0.028) 1px, transparent 1px);
	background-size: 100% 100%, 34px 34px, 34px 34px;
	background-attachment: fixed;
	min-height: 100vh;
	font-size: 0.96rem;
}

/* scanlines: static, very low contrast — texture, not an effect */
body::before {
	content: '';
	position: fixed;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	background: repeating-linear-gradient(
		to bottom,
		rgba(0, 0, 0, 0.16) 0,
		rgba(0, 0, 0, 0.16) 1px,
		transparent 1px,
		transparent 3px
	);
	opacity: 0.5;
}

body > * {
	position: relative;
	z-index: 1;
}

::selection {
	background: rgba(61, 220, 132, 0.28);
	color: #eafff2;
}


/* --- header ------------------------------------------------------------- */

.site-header {
	position: sticky;
	top: 0;
	z-index: 10;
	border-bottom: 1px solid var(--viry-rule);
	background: linear-gradient(180deg, rgba(61, 220, 132, 0.06), transparent), var(--bs-body-bg);
}

.site-header .brand {
	margin-right: auto;
}

.brand {
	font-family: var(--bs-font-monospace);
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--bs-primary);
	text-shadow: var(--viry-glow);
}

.brand:hover {
	color: var(--bs-link-hover-color);
}

/* the radar of viry.cz: the screen is the background, the sweep a conic gradient in ::before, the blip ::after */
.brand-radar {
	display: inline-block;
	width: 1em;
	height: 1em;
	margin-right: 0.6ch;
	vertical-align: -0.14em;
	position: relative;
	border-radius: 50%;
	border: 1px solid rgba(61, 220, 132, 0.42);
	box-shadow: var(--viry-glow);
	background:
		radial-gradient(circle at 50% 50%, rgba(61, 220, 132, 0.8) 0 9%, transparent 10%),
		radial-gradient(circle at 50% 50%, transparent 0 52%, rgba(61, 220, 132, 0.22) 53% 56%, transparent 57%),
		linear-gradient(rgba(61, 220, 132, 0.13) 0 100%) 50% 0 / 1px 100% no-repeat,
		linear-gradient(rgba(61, 220, 132, 0.13) 0 100%) 0 50% / 100% 1px no-repeat,
		rgba(61, 220, 132, 0.05);
}

.brand:hover .brand-radar {
	border-color: rgba(157, 255, 201, 0.7);
}

.brand-radar::before {
	content: '';
	position: absolute;
	inset: -1px;
	border-radius: 50%;
	background: conic-gradient(
		rgba(61, 220, 132, 0) 0deg,
		rgba(61, 220, 132, 0) 200deg,
		rgba(61, 220, 132, 0.1) 300deg,
		rgba(61, 220, 132, 0.38) 348deg,
		rgba(61, 220, 132, 0.95) 360deg
	);
	animation: viry-radar 2.6s linear infinite;
}

.brand-radar::after {
	content: '';
	position: absolute;
	top: 26%;
	left: 66%;
	width: 2px;
	height: 2px;
	border-radius: 50%;
	background: #9dffc9;
	box-shadow: 0 0 3px rgba(157, 255, 201, 0.9);
	opacity: 0;
	animation: viry-radar-blip 2.6s linear infinite;
}

@keyframes viry-radar {
	to {
		transform: rotate(360deg);
	}
}

@keyframes viry-radar-blip {
	0%, 8% {
		opacity: 0;
	}
	9% {
		opacity: 1;
	}
	55%, 100% {
		opacity: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.brand-radar::before,
	.brand-radar::after {
		animation: none;
	}

	.brand-radar::after {
		opacity: 0.75;
	}
}

.site-nav .nav-link {
	font-family: var(--bs-font-monospace);
	font-size: 0.85rem;
	text-transform: lowercase;
	color: var(--bs-secondary-color);
	padding: 0.25rem 0.6rem;
	white-space: nowrap;
}

.site-nav .nav-link::before {
	content: '/';
	opacity: 0.45;
}

.site-nav .nav-link:hover,
.site-nav .nav-link.active {
	color: var(--bs-primary);
}


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

.page-title {
	font-family: var(--bs-font-monospace);
	font-size: 1.35rem;
	color: var(--bs-emphasis-color);
	letter-spacing: -0.01em;
}

.page-title::before {
	content: '// ';
	color: var(--bs-primary);
	opacity: 0.7;
}

.meta-line {
	font-family: var(--bs-font-monospace);
	font-size: 0.78rem;
	color: var(--bs-secondary-color);
}

.site-intro {
	margin: 1rem 0 1.5rem;
}

.site-intro p {
	margin: 0 0 0.6rem;
	color: var(--bs-emphasis-color);
	font-size: 1.35rem;
	line-height: 1.6;
}

.site-intro p.lead-text {
	font-size: 1.05rem;
	color: var(--bs-body-color);
}

.prose {
	max-width: 44rem;
}

.prose h2 {
	font-family: var(--bs-font-monospace);
	font-size: 0.95rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--bs-primary);
	margin: 2rem 0 0.75rem;
	padding-bottom: 0.3rem;
	border-bottom: 1px solid var(--viry-rule);
}

.prose p,
.prose li {
	line-height: 1.65;
}

.prose ul,
.prose ol {
	padding-left: 1.1rem;
}

.lead-text {
	font-size: 1.05rem;
	color: var(--bs-emphasis-color);
}

.steps li {
	margin-bottom: 0.4rem;
}

.steps li::marker {
	font-family: var(--bs-font-monospace);
	color: var(--bs-primary);
}


/* --- forms --------------------------------------------------------------- */

.form-label {
	font-family: var(--bs-font-monospace);
	font-size: 0.82rem;
	color: var(--bs-secondary-color);
	margin-bottom: 0.2rem;
}

.form-control,
.form-select {
	background-color: #060a0c;
	border-color: var(--bs-border-color);
	color: var(--bs-body-color);
}

.form-control:focus,
.form-select:focus {
	background-color: #060a0c;
	border-color: var(--bs-primary);
	color: var(--bs-emphasis-color);
	box-shadow: 0 0 0 0.2rem rgba(61, 220, 132, 0.16);
}

.form-control::placeholder {
	color: rgba(198, 211, 204, 0.35);
}

.form-check-input {
	background-color: #060a0c;
	border-color: var(--bs-border-color);
}

.form-check-input:checked {
	background-color: var(--bs-primary);
	border-color: var(--bs-primary);
}

.btn-terminal {
	font-family: var(--bs-font-monospace);
	font-size: 0.82rem;
	color: var(--bs-primary);
	border: 1px solid rgba(61, 220, 132, 0.55);
	background: rgba(61, 220, 132, 0.08);
}

.btn-terminal:hover,
.btn-terminal:focus {
	color: #04150c;
	background: var(--bs-primary);
	border-color: var(--bs-primary);
	box-shadow: var(--viry-glow);
}

.signup-form {
	background: var(--viry-panel);
	border: 1px solid var(--bs-border-color);
	border-left: 2px solid rgba(61, 220, 132, 0.5);
}

.signup-note {
	font-family: var(--bs-font-monospace);
	font-size: 0.78rem;
	color: rgba(61, 220, 132, 0.9);
	border-left: 2px solid rgba(61, 220, 132, 0.5);
	padding: 0.5rem 0.8rem;
	margin-bottom: 1.25rem;
	background: rgba(61, 220, 132, 0.05);
}

.signup-note.is-failed {
	color: rgba(255, 139, 150, 0.9);
	border-left-color: rgba(255, 139, 150, 0.5);
	background: rgba(255, 139, 150, 0.05);
}

.form-error,
.form-errors {
	color: rgba(255, 139, 150, 0.9);
}

.form-errors {
	list-style: none;
	padding: 0;
	margin: 0 0 1rem;
}

/* the answer to the control question is one digit or one word */
.signup-answer {
	max-width: 8rem;
}

.form-hint {
	color: var(--bs-secondary-color);
	margin-top: 0.6rem;
}

/* honeypot: moved off the canvas rather than display: none, which some bots skip; must never show */
.signup-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}


/* --- footer ------------------------------------------------------------- */

.site-footer {
	margin-top: 3rem;
	border-top: 1px solid var(--viry-rule);
	font-size: 0.8rem;
	color: var(--bs-secondary-color);
}

.site-footer .lead-line {
	font-family: var(--bs-font-monospace);
	color: rgba(61, 220, 132, 0.55);
}

/* screenshots of the steps on the download page: never wider than the text, scaled with their ratio */
.step-shot {
	display: block;
	max-width: 100%;
	height: auto;
	margin: 0.6rem 0 0.4rem;
	border: 1px solid var(--bs-border-color);
	border-radius: 4px;
}

/* the service is in beta (decision of the administrator 2026-11-24) */
.beta-badge {
	margin-left: 0.6ch;
	padding: 0.05em 0.45em;
	border: 1px solid var(--bs-warning);
	border-radius: 3px;
	color: var(--bs-warning);
	font-size: 0.6em;
	font-weight: 600;
	letter-spacing: 0.05em;
	vertical-align: middle;
	text-shadow: none;
}

/* the menu folds under an icon on a narrow window, as on viry.cz (/root/code/virycz-monitor, www/assets/style.css):
   a <details>, pure CSS; on a wide window display: contents, so the <nav> stands in the header as before */
.site-menu {
	position: relative;
	flex: none;
	margin-left: auto;
}

.menu-toggle {
	display: inline-flex;
	align-items: center;
	padding: 0.25rem 0.5rem;
	border: 1px solid var(--bs-border-color);
	border-radius: var(--bs-border-radius-sm);
	background: var(--viry-panel);
	color: var(--bs-secondary-color);
	cursor: pointer;
	list-style: none;
}

.menu-toggle::-webkit-details-marker {
	display: none;
}

.menu-toggle:hover,
.menu-toggle:focus-visible,
.site-menu[open] > .menu-toggle {
	color: var(--bs-primary);
	border-color: rgba(61, 220, 132, 0.55);
}

@media (max-width: 47.98rem) {
	.site-menu[open] > .site-nav {
		position: absolute;
		top: calc(100% + 0.5rem);
		right: 0;
		z-index: 20;
		flex-direction: column;
		min-width: 11rem;
		padding: 0.4rem;
		background: var(--viry-panel);
		border: 1px solid var(--bs-border-color);
		border-left: 2px solid rgba(61, 220, 132, 0.5);
		box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
	}
}

@media (min-width: 48rem) {
	.site-menu {
		display: contents;
	}

	.menu-toggle {
		display: none;
	}

	.site-menu > .site-nav {
		display: flex !important;
		content-visibility: visible !important;
	}

	.site-menu::details-content {
		content-visibility: visible;
	}
}
