/**
 * Ritual Row site chrome — non-Elementor header, ticker, footer.
 * Shared by WordPress pages and static playground HTML.
 * Themes: matrix (default) | violet (Ritual Submission).
 */
:root {
	--rr-g: #00ff41;
	--rr-g2: #008f11;
	--rr-line: rgba(0, 255, 65, 0.28);
	--rr-bg: #0d0208;
	--rr-ticker-bg: #030604;
	--rr-glow: rgba(0, 255, 65, 0.85);
	--rr-glow-soft: rgba(0, 251, 51, 0.45);
	--rr-footer-ink: #060806;
	--rr-footer-muted: #8ab790;
	--rr-footer-line: rgba(0, 255, 65, 0.26);
	--rr-ticker-ink: #9dffb0;
	/* Compact single-row head (brand | nav | ticker | account) */
	--rr-chrome-sticky-offset: 52px;
	/* Shared Board + Profile stage inset so hopping those surfaces matches. */
	--rr-stage-gutter: clamp(16px, 3.2vw, 48px);
	--rr-font-display: "DotGothic16", ui-monospace, monospace;
	--rr-font-mono: "Fragment Mono", ui-monospace, monospace;
	--rr-font-crt: "VT323", ui-monospace, monospace;
	--rr-font-ui: "Fragment Mono", ui-monospace, monospace;
}

.rr-chrome[data-rr-chrome-theme="violet"] {
	--rr-g: #c9b8ff;
	--rr-g2: #8b7ec4;
	--rr-line: rgba(168, 148, 255, 0.28);
	--rr-bg: #120a2a;
	--rr-ticker-bg: #0a081c;
	--rr-glow: rgba(190, 170, 255, 0.9);
	--rr-glow-soft: rgba(160, 140, 255, 0.5);
	--rr-ticker-ink: #d4c8ff;
	--rr-footer-ink: #0a0818;
	--rr-footer-muted: #a89ad0;
	--rr-footer-line: rgba(168, 148, 255, 0.28);
}

.rr-chrome {
	position: sticky;
	top: 0;
	z-index: 100000;
	width: 100%;
	font-family: var(--rr-font-display), var(--rr-font-mono);
	color: var(--rr-g);
	background: #000;
}

body.admin-bar .rr-chrome {
	top: 32px;
}

body.admin-bar {
	--rr-chrome-sticky-offset: 84px;
}

/* Inline LIVE ticker inside the single-row head. */
.rr-ticker {
	position: relative;
	display: grid;
	grid-template-columns: auto 1fr;
	align-items: center;
	gap: 8px;
	min-width: 0;
	height: 30px;
	overflow: hidden;
	margin: 0;
	padding: 0 8px 0 0;
	border: 1px solid color-mix(in srgb, var(--rr-g) 32%, transparent);
	background: var(--rr-ticker-bg);
	box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rr-g) 8%, transparent), 0 0 12px color-mix(in srgb, var(--rr-g) 8%, transparent);
	font: 700 13px/1 var(--rr-font-crt);
	letter-spacing: 0;
	color: var(--rr-ticker-ink);
	text-shadow: 0 0 6px color-mix(in srgb, var(--rr-g) 35%, transparent);
}

.rr-ticker::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: repeating-linear-gradient(
		0deg,
		transparent 0,
		transparent 2px,
		rgba(0, 0, 0, 0.18) 2px,
		rgba(0, 0, 0, 0.18) 3px
	);
	opacity: 0.55;
	z-index: 1;
}

.rr-ticker--members { --rr-ticker-ink: #79d7ff; }
.rr-ticker--board { --rr-ticker-ink: #37ff7a; }
.rr-ticker--profile { --rr-ticker-ink: #d99cff; }
.rr-ticker--shop { --rr-ticker-ink: #00ff88; }
.rr-ticker--homepage,
.rr-ticker--playground { --rr-ticker-ink: #9dffb0; }
.rr-chrome[data-rr-chrome-theme="violet"] .rr-ticker--homepage,
.rr-chrome[data-rr-chrome-theme="violet"] .rr-ticker--playground,
.rr-chrome[data-rr-chrome-theme="violet"] .rr-ticker {
	--rr-ticker-ink: #d4c8ff;
}

.rr-ticker__label {
	position: relative;
	z-index: 2;
	flex: 0 0 auto;
	height: 100%;
	display: inline-flex;
	align-items: center;
	padding: 0 8px;
	white-space: nowrap;
	font-family: var(--rr-font-display);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.1em;
	color: #000;
	background: var(--rr-g);
	text-shadow: none;
	box-shadow: 0 0 10px color-mix(in srgb, var(--rr-g) 45%, transparent);
}

.rr-ticker__viewport {
	position: relative;
	z-index: 2;
	flex: 1;
	overflow: hidden;
	white-space: nowrap;
	min-width: 0;
	mask-image: linear-gradient(90deg, transparent, #000 12px, #000 calc(100% - 12px), transparent);
}

.rr-ticker__track {
	display: inline-flex;
	min-width: max-content;
	animation: rrTickerScroll 42s steps(180) infinite;
}

.rr-ticker__item {
	display: inline-block;
	padding-right: 48px;
	font-weight: 400;
	font-size: 13px;
}

.rr-ticker__item--scrap {
	font-style: italic;
	opacity: 0.92;
}

.rr-ticker__item b {
	opacity: 0.65;
	padding-right: 8px;
	font-weight: 700;
}

.rr-ticker__item i {
	font-style: normal;
	padding-left: 18px;
	opacity: 0.8;
}

@keyframes rrTickerScroll {
	from { transform: translateX(100%); }
	to { transform: translateX(-100%); }
}

@media (prefers-reduced-motion: reduce) {
	.rr-ticker__track {
		animation: none;
		transform: none;
	}
}

/* Single row: brand | nav | LIVE ticker | account + cart. Matrix + violet share layout. */
.rr-head {
	display: grid;
	grid-template-columns: auto auto minmax(140px, 1fr) auto;
	grid-template-areas: "brand nav ticker end";
	align-items: center;
	column-gap: 12px;
	row-gap: 0;
	min-height: 48px;
	padding: 8px 12px;
	border-bottom: 1px solid var(--rr-line);
	background: var(--rr-bg);
	box-sizing: border-box;
	position: relative;
}

.rr-head::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: repeating-linear-gradient(
		0deg,
		transparent 0,
		transparent 2px,
		rgba(0, 0, 0, 0.2) 2px,
		rgba(0, 0, 0, 0.2) 3px
	);
	opacity: 0.4;
	z-index: 1;
}

.rr-head > * {
	position: relative;
	z-index: 2;
}

.rr-logo {
	grid-area: brand;
	justify-self: start;
	margin: 0;
	padding: 2px 0;
	font: 16px/1 var(--rr-font-display);
	color: var(--rr-g);
	text-decoration: none;
	text-shadow: 0 0 8px var(--rr-glow-soft);
	white-space: nowrap;
	transform-origin: center left;
	transition: transform 0.28s ease, color 0.2s ease, text-shadow 0.2s ease;
}

.rr-logo:hover {
	color: #e8ffe9;
	transform: scale(1.06);
	text-shadow: 0 0 12px var(--rr-glow), 0 0 28px var(--rr-glow-soft);
}

.rr-chrome[data-rr-chrome-theme="violet"] .rr-logo:hover {
	color: #eae2ff;
}

.rr-nav {
	grid-area: nav;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-start;
	justify-self: start;
	gap: 2px;
	margin: 0;
	padding: 0;
	min-width: 0;
	list-style: none;
}

.rr-nav a {
	display: inline-block;
	padding: 6px 10px;
	font: 13px/1.1 var(--rr-font-display);
	color: var(--rr-g2);
	text-decoration: none;
	white-space: nowrap;
	letter-spacing: 0;
	text-transform: uppercase;
	background: transparent;
	border: 0;
	box-shadow: none;
	transform-origin: center;
	transition: color 0.18s ease, letter-spacing 0.18s ease, transform 0.22s ease, text-shadow 0.22s ease;
}

.rr-nav a:hover {
	color: var(--rr-g);
	letter-spacing: 0.06em;
	transform: scale(1.08);
	text-shadow: 0 0 10px var(--rr-glow-soft);
	background: transparent;
	border: 0;
	box-shadow: none;
}

.rr-nav a.is-active,
.rr-nav a[aria-current="page"] {
	color: var(--rr-g);
}

.rr-head .rr-ticker {
	grid-area: ticker;
}

.rr-head__end {
	grid-area: end;
	justify-self: end;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
}

.rr-account {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 28px;
	max-width: 100%;
	font: 13px/1.1 var(--rr-font-display);
	color: var(--rr-g2);
	text-decoration: none;
	white-space: nowrap;
}

.rr-account--guest {
	gap: 5px;
}

.rr-account__link {
	color: var(--rr-g2);
	text-decoration: none;
	letter-spacing: 0;
	transition: color 0.18s ease, letter-spacing 0.18s ease;
}

.rr-account__link:hover {
	color: var(--rr-g);
	letter-spacing: 0.04em;
}

.rr-account__sep {
	color: color-mix(in srgb, var(--rr-g) 35%, transparent);
	user-select: none;
}

.rr-account--user {
	gap: 8px;
	padding-right: 4px;
	color: var(--rr-g2);
}

.rr-account--user:hover {
	color: var(--rr-g);
}

.rr-account__media {
	display: inline-grid;
	place-items: center;
	flex: 0 0 auto;
}

.rr-account__avatar {
	display: block;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: 1px solid color-mix(in srgb, var(--rr-g) 45%, transparent);
	object-fit: cover;
}

.rr-account__name {
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 12ch;
}

.rr-cart {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 32px;
	margin: 0;
	padding: 4px 8px;
	border: 1px solid color-mix(in srgb, var(--rr-g) 35%, transparent);
	background: color-mix(in srgb, var(--rr-g) 8%, rgba(0, 0, 0, 0.55));
	color: var(--rr-g);
	font: 11px/1 var(--rr-font-mono);
	text-decoration: none;
	white-space: nowrap;
}

.rr-cart:hover {
	border-color: var(--rr-g);
	background: color-mix(in srgb, var(--rr-g) 16%, rgba(0, 0, 0, 0.5));
}

.rr-cart__count {
	display: inline-grid;
	place-items: center;
	box-sizing: border-box;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 999px;
	border: 1px solid transparent;
	background: var(--rr-g) !important;
	color: var(--rr-footer-ink, #041004) !important;
	font-size: 11px !important;
	font-weight: 700 !important;
	line-height: 1 !important;
	letter-spacing: 0 !important;
	text-shadow: none !important;
	-webkit-text-fill-color: var(--rr-footer-ink, #041004) !important;
}

.rr-cart__count--empty {
	background: transparent !important;
	border-color: var(--rr-g) !important;
	color: var(--rr-g) !important;
	-webkit-text-fill-color: var(--rr-g) !important;
	font-weight: 600 !important;
}

/* Kill Elementor Theme Builder header/footer so only rr-chrome remains. */
body:not(.rr-chrome-skip) .elementor-location-header,
body:not(.rr-chrome-skip) .elementor-327.elementor-location-header,
body:not(.rr-chrome-skip) .elementor-location-footer,
body:not(.rr-chrome-skip) .elementor-364.elementor-location-footer {
	display: none !important;
	height: 0 !important;
	min-height: 0 !important;
	overflow: hidden !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	pointer-events: none !important;
}

/* Footer: denser stack; type bumped except DONATE */
.rr-footer {
	--ritual-footer-ink: var(--rr-footer-ink);
	--ritual-footer-green: var(--rr-g);
	--ritual-footer-muted: var(--rr-footer-muted);
	--ritual-footer-line: var(--rr-footer-line);
	margin-top: clamp(16px, 2.5vw, 40px);
	padding: 10px 16px 8px;
	border-top: 1px solid var(--rr-footer-line);
	background: linear-gradient(180deg, rgba(0, 255, 65, 0.08), transparent 8px), var(--rr-footer-ink);
	color: var(--rr-g);
	font-family: var(--rr-font-display);
	text-align: center;
}

.rr-footer__inner {
	max-width: 640px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
}

.rr-footer__contact {
	margin: 0;
	padding: 2px 12px;
	color: var(--rr-footer-muted);
	font: 400 14px/1.35 var(--rr-font-display);
	letter-spacing: 0.04em;
}

.rr-footer__contact a {
	color: inherit;
	text-decoration: none;
}

.rr-footer__contact a:hover,
.rr-footer__contact a:focus-visible {
	color: #fff;
	text-shadow: 0 0 12px rgba(0, 255, 65, 0.8);
}

.rr-footer__link {
	display: inline-block;
	padding: 2px 12px;
	color: var(--rr-g);
	font: 500 13px/1.3 var(--rr-font-display);
	letter-spacing: 0.12em;
	text-transform: uppercase;
	text-decoration: none;
	transition: color 0.2s ease, text-shadow 0.2s ease;
}

.rr-footer__link:hover,
.rr-footer__link:focus-visible {
	color: #fff;
	text-shadow: 0 0 12px rgba(0, 255, 65, 0.8);
}

.rr-footer__link:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 3px;
}

.rr-footer__copy {
	margin: 0;
	padding: 2px 12px 0;
	color: var(--rr-footer-muted);
	font: 400 11px/1.3 var(--rr-font-display);
	letter-spacing: 0.1em;
}

.rr-donate-wrap {
	display: flex;
	justify-content: center;
	padding: 8px 0 6px;
}

.rr-donate {
	position: relative;
	display: inline-flex;
	justify-content: center;
	align-items: center;
	min-width: 200px;
	padding: 10px 36px;
	border: 2px solid #00ff41;
	background: #000;
	color: #00ff41;
	font: 700 24px/1 var(--rr-font-display);
	letter-spacing: 2px;
	text-transform: uppercase;
	text-decoration: none;
	box-shadow: 0 0 5px rgba(0, 255, 65, 0.2);
	transition: all 0.2s ease;
	cursor: pointer;
}

.rr-donate span {
	transition: opacity 0.1s ease;
}

.rr-donate:hover,
.rr-donate:focus-visible {
	background: #00ff41;
	color: #000;
	border-color: #00ff41;
	box-shadow: 0 0 25px #00ff41;
	animation: rrDonatePulse 0.8s infinite;
}

.rr-donate:hover span,
.rr-donate:focus-visible span {
	opacity: 0;
}

.rr-donate::before {
	content: "PLEASE";
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	color: #000;
	font-weight: 900;
	font-size: 24px;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.1s;
}

.rr-donate:hover::before,
.rr-donate:focus-visible::before {
	opacity: 1;
}

.rr-donate::after {
	content: "$ $ $";
	position: absolute;
	top: -10px;
	width: 100%;
	text-align: center;
	font-size: 18px;
	font-weight: 700;
	color: #00ff41;
	opacity: 0;
	pointer-events: none;
	line-height: 1;
}

.rr-donate:hover::after,
.rr-donate:focus-visible::after {
	animation: rrMoneyFloat 1s ease-out infinite;
}

@keyframes rrDonatePulse {
	0% { transform: scale(1); }
	50% { transform: scale(1.05); }
	100% { transform: scale(1); }
}

@keyframes rrMoneyFloat {
	0% {
		transform: translateY(0) scale(0.8);
		opacity: 1;
		text-shadow: 0 0 5px #fff;
	}
	100% {
		transform: translateY(-50px) scale(1.5);
		opacity: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.rr-footer__link,
	.rr-donate,
	.rr-donate span {
		transition: none !important;
	}
	.rr-donate:hover,
	.rr-donate:focus-visible,
	.rr-donate:hover::after,
	.rr-donate:focus-visible::after {
		animation: none !important;
	}
}

@media (max-width: 782px) {
	.rr-chrome {
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
	}

	body.admin-bar .rr-chrome {
		top: 46px;
	}

	body.rr-chrome-on:not(.rr-site-skin) {
		padding-top: 128px;
	}

	:root {
		--rr-chrome-sticky-offset: 56px;
	}

	body.admin-bar {
		--rr-chrome-sticky-offset: 102px;
	}

	.rr-head {
		grid-template-columns: auto 1fr auto;
		grid-template-areas:
			"brand end end"
			"nav nav nav"
			"ticker ticker ticker";
		min-height: 0;
		padding: 6px 10px 8px;
		column-gap: 8px;
		row-gap: 6px;
	}

	.rr-logo {
		font-size: 15px;
	}

	.rr-account {
		max-width: 36vw;
		font-size: 12px;
		gap: 4px;
	}

	.rr-account__avatar {
		width: 24px;
		height: 24px;
	}

	.rr-account__name {
		max-width: 10ch;
	}

	.rr-nav {
		max-width: 100%;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	.rr-nav a {
		padding: 6px 7px;
		font-size: 12px;
	}

	.rr-cart {
		padding: 4px 6px;
		font-size: 10px;
	}

	.rr-ticker {
		height: 28px;
		font-size: 15px;
	}

	.rr-footer {
		margin-top: 14px;
		padding: 8px 12px 6px;
	}

	.rr-footer__contact {
		font-size: 13px;
	}

	.rr-footer__link {
		font-size: 12px;
		letter-spacing: 0.1em;
	}

	.rr-footer__copy {
		font-size: 10px;
	}

	.rr-donate-wrap {
		padding: 6px 0 4px;
	}

	.rr-donate {
		min-width: 160px;
		font-size: 18px;
		padding: 9px 24px;
	}

	.rr-donate::before {
		font-size: 18px;
	}
}

/* --------------------------------------------------------------------------
 * Modern CRT override — softens Elementor template 347 HUD (post-347.css).
 * Loaded only when site chrome is on (MicroShop already excluded).
 * -------------------------------------------------------------------------- */
body.elementor-page-347 {
	background-color: #060806 !important;
	background-image:
		linear-gradient(rgba(0, 255, 65, 0.045) 1px, transparent 1px),
		linear-gradient(90deg, rgba(0, 255, 65, 0.045) 1px, transparent 1px) !important;
	background-size: 56px 56px !important;
	animation: none !important;
}

body.elementor-page-347::before {
	content: "" !important;
	display: block !important;
	position: fixed !important;
	inset: 0 !important;
	pointer-events: none !important;
	z-index: 9998 !important;
	box-shadow: none !important;
	background:
		repeating-linear-gradient(
			0deg,
			transparent 0,
			transparent 3px,
			rgba(0, 0, 0, 0.045) 3px,
			rgba(0, 0, 0, 0.045) 4px
		),
		radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, 0.42) 100%) !important;
	background-size: auto !important;
	animation: none !important;
	opacity: 1 !important;
}

/* Kill the bright green corner-bracket HUD frame. */
body.elementor-page-347::after {
	content: none !important;
	display: none !important;
	background: none !important;
	animation: none !important;
	box-shadow: none !important;
}

@media (prefers-reduced-motion: reduce) {
	body.elementor-page-347,
	body.elementor-page-347::before,
	body.elementor-page-347::after {
		animation: none !important;
	}
}
