:root {
	color-scheme: light;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	color: #232934;
	background: #fbfcfe;
	font-synthesis: none;
}
* {
	box-sizing: border-box;
}
body {
	margin: 0;
	min-height: 100svh;
	display: grid;
	grid-template-rows: auto 1fr auto;
	background: radial-gradient(ellipse at 50% 39%, #edf0ff 0, #f7f8fd 28%, #fbfcfe 62%);
}
.page-header,
footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 30px 48px;
}
.brand {
	display: inline-flex;
}
.brand img {
	object-fit: contain;
}
.demo-label {
	display: flex;
	align-items: center;
	gap: 9px;
	color: #596375;
	font-size: 13px;
}
.demo-label > span {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #5065f5;
}
main {
	display: grid;
	place-items: center;
	padding: 42px 24px 70px;
}
.loading {
	text-align: center;
	width: min(100%, 560px);
}
.symbol {
	position: relative;
	width: 112px;
	height: 112px;
	margin: 0 auto 39px;
	display: grid;
	place-items: center;
}
.symbol img {
	object-fit: contain;
}
.eyebrow {
	color: #6c7590;
	font-size: 10px;
	font-weight: 650;
	letter-spacing: 2px;
	margin: 0 0 18px;
}
h1 {
	margin: 0;
	font-size: clamp(27px, 3.4vw, 39px);
	letter-spacing: -1.5px;
	line-height: 1.2;
	font-weight: 620;
}
.intro {
	color: #6d7584;
	font-size: 16px;
	line-height: 1.8;
	margin: 19px 0 30px;
}
.progress {
	width: 224px;
	height: 3px;
	border-radius: 10px;
	overflow: hidden;
	margin: 0 auto;
	background: #e3e7f3;
}
.progress span {
	display: block;
	width: 38%;
	height: 100%;
	background: #5062eb;
	border-radius: inherit;
	animation: progress 2.2s ease-in-out infinite;
}
.note {
	display: flex;
	align-items: flex-start;
	justify-content: center;
	gap: 11px;
	margin: 54px auto 0;
	padding-top: 24px;
	border-top: 1px solid #e5e8f0;
	width: fit-content;
	text-align: left;
}
.note svg {
	width: 20px;
	height: 20px;
	margin-top: 2px;
	fill: none;
	stroke: #7c87a2;
	stroke-width: 1.4;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.note p {
	font-size: 12px;
	line-height: 1.8;
	color: #687286;
	margin: 0;
}
.note span {
	color: #858c9a;
}
footer {
	color: #7b8392;
	font-size: 12px;
	padding-bottom: 27px;
}
a {
	color: inherit;
	text-decoration: none;
}
footer a {
	padding: 8px 0;
}
footer a:hover {
	color: #4054df;
}
a:focus-visible {
	outline: 2px solid #4054df;
	outline-offset: 6px;
	border-radius: 3px;
}
@keyframes progress {
	0% {
		transform: translateX(-110%);
	}
	100% {
		transform: translateX(370%);
	}
}
@media (max-width: 600px) {
	.page-header {
		padding: 23px 24px;
	}
	.brand img {
		width: 112px;
		height: 37px;
	}
	main {
		padding: 36px 22px 48px;
	}
	.symbol {
		margin-bottom: 32px;
	}
	footer {
		padding: 18px 24px;
		gap: 12px;
		flex-wrap: wrap;
		font-size: 11px;
	}
	.note {
		margin-top: 40px;
	}
}
@media (prefers-reduced-motion: reduce) {
	.progress span {
		animation: none;
	}
}

.loading-phase {
	min-height: 2.8em;
	margin: 9px 0 0;
	color: #5062a0;
	font-size: 12px;
	line-height: 1.4;
}

.loading-phase span {
	display: inline-block;
}

#ambient-background {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	mask-image: radial-gradient(
			ellipse 36% 40% at 50% 50%,
			rgba(0, 0, 0, 0.12) 0%,
			rgba(0, 0, 0, 0.25) 65%,
			#000 100%
		),
		linear-gradient(to bottom, transparent, #000 150px, #000 calc(100% - 70px), transparent);
	mask-composite: intersect;
}
#loader-surface {
	position: relative;
	min-height: 100svh;
	display: grid;
	grid-template-rows: auto 1fr auto;
}
#loader-surface[hidden] {
	display: none;
}
#playground {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	opacity: 0;
	pointer-events: none;
}
.demo-ready #playground {
	opacity: 1;
	pointer-events: auto;
}
#retry {
	border: 0;
	border-radius: 7px;
	background: #4054df;
	color: white;
	font: inherit;
	font-size: 14px;
	padding: 11px 18px;
	cursor: pointer;
}
.demo-error .progress {
	visibility: hidden;
}

.loading-steps {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px 24px;
	list-style: none;
	padding: 0;
	margin: 20px auto 0;
	width: 100%;
	max-width: 100%;
	text-align: left;
}
.loading-steps li {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 8px;
	white-space: nowrap;
	min-height: 46px;
	font-size: 13px;
	color: #848c9d;
	transition: color 200ms ease;
}
.step-marker {
	position: relative;
	display: grid;
	place-items: center;
	width: 26px;
	height: 26px;
	flex-shrink: 0;
	border: 1px solid #dce1ec;
	border-radius: 50%;
	font-size: 11px;
	font-weight: 600;
}
.loading-steps .is-active {
	color: #4054df;
	font-weight: 600;
}
.is-active .step-marker {
	border-color: #5062eb;
	background: #eef0ff;
}
.is-active .step-marker::before {
	content: '';
	position: absolute;
	inset: -4px;
	border: 1px solid #bdc6ff;
	border-radius: 50%;
	animation: phase-pulse 2s ease-in-out infinite;
}
.loading-steps .is-complete {
	color: #426f66;
}
.is-complete .step-marker {
	background: #eaf3ef;
	border-color: #d2e5db;
}
.loading-steps .is-failed {
	color: #a04444;
}
.is-failed .step-marker {
	border-color: #d7a3a3;
}
.loading .note {
	margin-top: 20px;
}
.screen-reader-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}
@keyframes phase-pulse {
	50% {
		opacity: 0.25;
		transform: scale(1.12);
	}
}
@media (prefers-reduced-motion: reduce) {
	.is-active .step-marker::before {
		animation: none;
	}
	.loading-steps li {
		transition: none;
	}
}

@media (max-width: 600px) {
	#ambient-background {
		opacity: 0.55;
	}
}

/* Grid reserves the tallest headline so wrapped mobile titles never shift the UI. */
.rotating-title {
	display: grid;
	perspective: 700px;
}
.headline-slide {
	grid-area: 1 / 1;
	align-self: center;
	opacity: 0;
	transform-origin: center center;
	backface-visibility: hidden;
	animation: headline-turn 15s ease-in-out infinite;
	animation-delay: -0.6s;
}
.headline-slide:nth-of-type(3) {
	animation-delay: 4.4s;
}
.headline-slide:nth-of-type(4) {
	animation-delay: 9.4s;
}
@keyframes headline-turn {
	0% {
		opacity: 0;
		transform: translateY(25%) rotateX(-70deg);
	}
	4%,
	29% {
		opacity: 1;
		transform: translateY(0) rotateX(0);
	}
	33%,
	100% {
		opacity: 0;
		transform: translateY(-25%) rotateX(70deg);
	}
}
@media (prefers-reduced-motion: reduce) {
	.headline-slide {
		animation: none;
		display: none;
	}
	.headline-slide:nth-of-type(2) {
		display: block;
		opacity: 1;
		transform: none;
	}
}

.recovery-actions {
	display: flex;
	justify-content: center;
	align-items: center;
	flex-wrap: wrap;
	gap: 16px;
}
.direct-start {
	color: #4054df;
	font-size: 14px;
	text-underline-offset: 3px;
}
#startup-diagnostic {
	font-size: 12px;
	color: #666;
	overflow-wrap: anywhere;
}
