.swrf-race-system,
.swrf-race-system * {
	box-sizing: border-box;
}

.swrf-race-system {
	--swrf-race-ink: #07090a;
	--swrf-race-paper: #e9edee;
	--swrf-race-benzin: #08c9df;
	--swrf-race-muted: #007f91;
	position: relative;
	display: grid;
	place-items: center;
	width: 100%;
	min-height: min(920px, 92svh);
	overflow: hidden;
	background:
		radial-gradient(circle at 50% 48%, rgba(8, 201, 223, .075), transparent 29%),
		linear-gradient(rgba(8, 201, 223, .025) 1px, transparent 1px),
		linear-gradient(90deg, rgba(8, 201, 223, .025) 1px, transparent 1px),
		var(--swrf-race-ink);
	background-size: auto, 64px 64px, 64px 64px, auto;
	color: var(--swrf-race-paper);
	font-family: "IBM Plex Mono", Consolas, monospace;
}

.swrf-race-system::before,
.swrf-race-system::after {
	position: absolute;
	content: "";
	pointer-events: none;
}

.swrf-race-system::before {
	inset: 0;
	background: linear-gradient(90deg, var(--swrf-race-ink), transparent 12%, transparent 88%, var(--swrf-race-ink));
}

.swrf-race-system::after {
	inset: 24px;
	border: 1px solid rgba(233, 237, 238, .08);
}

.swrf-race-system__sr-only {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

.swrf-race-system__stage {
	position: relative;
	z-index: 1;
	width: min(96vw, 86svh, 920px);
	aspect-ratio: 1;
}

.swrf-race-system__system-label {
	position: absolute;
	z-index: 5;
	top: 1.5%;
	left: 50%;
	color: var(--swrf-race-benzin);
	font-size: clamp(8px, .75vw, 11px);
	font-weight: 700;
	letter-spacing: .15em;
	text-transform: uppercase;
	transform: translateX(-50%);
	white-space: nowrap;
}

.swrf-race-system__orbit {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	overflow: visible;
	pointer-events: none;
}

.swrf-race-system__track,
.swrf-race-system__scanner,
.swrf-race-system__sector {
	fill: none;
	transform-box: fill-box;
	transform-origin: center;
}

.swrf-race-system__track {
	stroke: var(--swrf-race-muted);
	stroke-width: 2;
	stroke-dasharray: 3 1.2;
	opacity: .72;
}

.swrf-race-system__scanner {
	stroke: rgba(233, 237, 238, .42);
	stroke-width: 1;
	stroke-dasharray: 1 99;
	animation: swrf-race-scanner 9s linear infinite;
}

.swrf-race-system__sector {
	stroke: var(--swrf-race-benzin);
	stroke-width: 5;
	stroke-dasharray: 11.8 88.2;
	opacity: 0;
	transform: rotate(var(--sector-rotation));
	transition: opacity .22s ease, filter .22s ease, stroke-width .22s ease;
}

.swrf-race-system__sector.is-active {
	stroke-width: 9;
	opacity: 1;
	filter: drop-shadow(0 0 11px rgba(8, 201, 223, .9));
}

.swrf-race-system__ticks line {
	stroke: var(--swrf-race-benzin);
	stroke-width: 4;
	opacity: .66;
}

.swrf-race-system__core {
	position: absolute;
	z-index: 2;
	top: 48%;
	left: 50%;
	display: grid;
	place-items: center;
	width: 43%;
	transform: translate(-50%, -50%);
	pointer-events: none;
}

.swrf-race-system__core::before {
	position: absolute;
	inset: 16%;
	content: "";
	border-radius: 50%;
	background: rgba(8, 201, 223, .08);
	filter: blur(28px);
}

.swrf-race-system__core img {
	position: relative;
	display: block;
	width: 100%;
	height: auto;
	filter: drop-shadow(0 0 18px rgba(8, 201, 223, .08));
	transition: filter .25s ease, transform .25s ease;
}

.swrf-race-system.is-ready:has(.swrf-race-system__node:hover) .swrf-race-system__core img,
.swrf-race-system.is-ready:has(.swrf-race-system__node:focus-visible) .swrf-race-system__core img {
	filter: drop-shadow(0 0 22px rgba(8, 201, 223, .26));
	transform: scale(1.025);
}

.swrf-race-system__nodes {
	position: absolute;
	inset: 0;
}

.swrf-race-system__node {
	position: absolute;
	z-index: 6;
	display: grid;
	gap: 4px;
	min-width: 150px;
	padding: 10px 12px;
	border: 0;
	background: transparent;
	color: var(--swrf-race-muted);
	font: inherit;
	text-decoration: none !important;
	text-transform: uppercase;
	cursor: pointer;
	transition: color .2s ease, filter .2s ease, transform .2s ease;
}

.swrf-race-system__node:hover,
.swrf-race-system__node:focus-visible,
.swrf-race-system__node.is-active {
	color: var(--swrf-race-paper);
	filter: drop-shadow(0 0 11px rgba(8, 201, 223, .48));
	text-decoration: none !important;
	outline: none;
}

.swrf-race-system__node:focus-visible {
	box-shadow: inset 0 0 0 1px var(--swrf-race-benzin);
}

.swrf-race-system__node-number {
	color: var(--swrf-race-benzin);
	font-size: clamp(11px, 1.05vw, 16px);
	font-weight: 700;
	letter-spacing: .08em;
}

.swrf-race-system__node-city {
	color: currentColor;
	font-family: "Arial Narrow", "Roboto Condensed", sans-serif;
	font-size: clamp(18px, 1.7vw, 25px);
	font-weight: 800;
	line-height: 1;
	letter-spacing: .015em;
	transition: color .2s ease, text-shadow .2s ease;
}

.swrf-race-system__node:hover .swrf-race-system__node-city,
.swrf-race-system__node:focus-visible .swrf-race-system__node-city,
.swrf-race-system__node.is-active .swrf-race-system__node-city {
	text-shadow: 0 0 16px rgba(8, 201, 223, .52);
}

.swrf-race-system__node-state {
	display: none;
	font-size: 9px;
	font-weight: 700;
	letter-spacing: .08em;
}

.swrf-race-system__node--waw {
	top: 4%;
	left: 50%;
	text-align: center;
	transform: translateX(-50%);
}

.swrf-race-system__node--gda {
	top: 25%;
	left: 0;
}

.swrf-race-system__node--wro {
	bottom: 20%;
	left: 0;
}

.swrf-race-system__node--krk {
	top: 25%;
	right: 0;
	text-align: right;
}

.swrf-race-system__node--poz {
	right: 0;
	bottom: 20%;
	text-align: right;
}

.swrf-race-system__node--gf {
	bottom: 2%;
	left: 50%;
	text-align: center;
	transform: translateX(-50%);
}

@keyframes swrf-race-scanner {
	from { transform: rotate(-90deg); }
	to { transform: rotate(270deg); }
}

@media (max-width: 820px) {
	.swrf-race-system {
		display: block;
		min-height: 0;
		padding: 48px 18px 28px;
	}

	.swrf-race-system::after {
		inset: 12px;
	}

	.swrf-race-system__stage {
		display: flex;
		flex-direction: column;
		width: 100%;
		aspect-ratio: auto;
	}

	.swrf-race-system__system-label {
		position: relative;
		top: auto;
		left: auto;
		order: 0;
		margin-bottom: 4px;
		text-align: center;
		transform: none;
	}

	.swrf-race-system__orbit {
		top: 20px;
		left: 50%;
		width: min(92vw, 370px);
		height: min(92vw, 370px);
		transform: translateX(-50%);
	}

	.swrf-race-system__core {
		position: relative;
		top: auto;
		left: auto;
		order: 1;
		width: 100%;
		height: min(82vw, 330px);
		transform: none;
	}

	.swrf-race-system__core img {
		width: min(58vw, 230px);
	}

	.swrf-race-system__nodes {
		position: relative;
		inset: auto;
		order: 2;
		display: grid;
		margin-top: 8px;
	}

	.swrf-race-system__node,
	.swrf-race-system__node--waw,
	.swrf-race-system__node--gda,
	.swrf-race-system__node--wro,
	.swrf-race-system__node--krk,
	.swrf-race-system__node--poz,
	.swrf-race-system__node--gf {
		position: relative;
		top: auto;
		right: auto;
		bottom: auto;
		left: auto;
		display: grid;
		grid-template-columns: 52px minmax(0, 1fr);
		grid-template-rows: auto auto;
		align-items: center;
		column-gap: 12px;
		row-gap: 5px;
		width: 100%;
		min-width: 0;
		min-height: 66px;
		padding: 12px 4px;
		border-top: 1px solid rgba(233, 237, 238, .18);
		text-align: left;
		transform: none;
	}

	.swrf-race-system__node:last-child {
		border-bottom: 1px solid rgba(233, 237, 238, .18);
	}

	.swrf-race-system__node-number {
		grid-column: 1;
		grid-row: 1 / 3;
		font-size: 12px;
	}

	.swrf-race-system__node-city {
		grid-column: 2;
		grid-row: 1;
		font-size: clamp(22px, 6.8vw, 30px);
		white-space: nowrap;
	}

	.swrf-race-system__node-state {
		display: block;
		grid-column: 2;
		grid-row: 2;
		max-width: none;
		color: rgba(233, 237, 238, .56);
		text-align: left;
	}
}

@media (max-width: 520px) {
	.swrf-race-system {
		padding: 42px 6px 24px;
	}

	.swrf-race-system::after {
		inset: 7px;
	}

	.swrf-race-system__orbit {
		top: 14px;
		width: min(122vw, 500px);
		height: min(122vw, 500px);
	}

	.swrf-race-system__core {
		height: min(105vw, 430px);
	}

	.swrf-race-system__core img {
		width: min(78vw, 320px);
	}

	.swrf-race-system__nodes {
		margin-top: 2px;
		padding-inline: 8px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.swrf-race-system__scanner {
		animation: none;
	}

	.swrf-race-system *,
	.swrf-race-system *::before,
	.swrf-race-system *::after {
		scroll-behavior: auto !important;
		transition-duration: .01ms !important;
	}
}

/* Builder sections must follow the containing block, not include the scrollbar. */
@media (max-width: 1024px) {
	.breakdance .bde-section:has(.swrf-race-system, .swrf-leaderboard),
	.breakdance .bde-section:has(.swrf-race-system, .swrf-leaderboard) .section-container,
	.breakdance .bde-section:has(.swrf-race-system, .swrf-leaderboard) .bde-shortcode,
	.breakdance .bde-section:has(.swrf-race-system, .swrf-leaderboard) .swrf-leaderboard {
		width: 100% !important;
		max-width: 100% !important;
		min-width: 0;
	}
	.breakdance .bde-section:has(.swrf-leaderboard) .swrf-leaderboard {
		margin-inline: 0 !important;
	}
}

/* Mobile data sections use the full available width; cards retain their padding. */
@media (max-width: 767px) {
	.breakdance .bde-section:has(.swrf-round-page, .swrf-public-list, .swrf-race-list, .swrf-gf, .swrf-leaderboard),
	.breakdance .bde-section:has(.swrf-round-page, .swrf-public-list, .swrf-race-list, .swrf-gf, .swrf-leaderboard) > .section-container,
	.breakdance .bde-shortcode:has(.swrf-round-page, .swrf-public-list, .swrf-race-list, .swrf-gf, .swrf-leaderboard) {
		width: 100% !important;
		max-width: 100% !important;
		min-width: 0;
		padding-inline: 0 !important;
		margin-inline: 0 !important;
	}
	.swrf-round-page .swrf-round-page__inner,
	.swrf-gf,
	.swrf-race-list,
	.swrf-public-list,
	.breakdance .swrf-leaderboard {
		box-sizing: border-box;
		width: 100% !important;
		max-width: 100% !important;
		min-width: 0;
		padding-inline: 0 !important;
		margin-inline: 0 !important;
	}
	.swrf-gf .swrf-leaderboard h2,
	.swrf-race-list > header h2 {
		max-width: 100%;
		font-size: clamp(28px, 8vw, 38px);
		overflow-wrap: anywhere;
	}
	.swrf-race-list__heat li {
		grid-template-columns: 20px 78px minmax(0, 1fr);
	}
	.swrf-race-list__heat li > div {
		min-width: 0;
		overflow-wrap: anywhere;
	}
}
