:root {
	color-scheme: dark;
	--kg-orange: #f05032;
	--kg-surface: #161b22;
	--kg-ink: #e6edf3;
	--kg-muted: #aeb9c7;
	font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

.kg-entry {
	margin: 0;
	display: grid;
	grid-template-rows: 1fr auto;
	min-height: 100vh;
	min-height: 100svh;
	color: var(--kg-ink);
	background:
		radial-gradient(ellipse at 20% 12%, #522d28 0%, transparent 48%),
		radial-gradient(ellipse at 86% 85%, #202c3e 0%, transparent 58%),
		#0f141c;
}

.kg-main {
	display: grid;
	place-items: center;
	padding: clamp(1.25rem, 5vw, 4rem);
}

.kg-panel {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1.4rem;
	width: min(100%, 28rem);
	padding: clamp(1.8rem, 7vw, 3.15rem) clamp(1.35rem, 6vw, 2.7rem);
	border: 1px solid #e6edf323;
	border-radius: 1.5rem;
	background: linear-gradient(155deg, #262227e8, #161b22ec 67%);
	box-shadow: 0 1.5rem 4.5rem #070a11a6, inset 0 1px #ffffff08;
	text-align: center;
}

.kg-wordmark { margin: 0; line-height: 0; }
.kg-wordmark a { display: inline-block; border-radius: .35rem; }
.kg-wordmark img { display: block; max-width: 100%; height: auto; }
.kg-summary { margin: 0; color: var(--kg-muted); font-size: 1rem; line-height: 1.5; }
.kg-signin { gap: 1.65rem; }

.kg-action {
	display: inline-flex;
	justify-content: center;
	align-items: center;
	gap: .65rem;
	min-height: 3.1rem;
	max-width: 100%;
	padding: .65rem 1.15rem;
	border: 1px solid transparent;
	border-radius: .65rem;
	font-size: 1rem;
	font-weight: 650;
	line-height: 1.35;
	text-decoration: none;
	transition: background-color 150ms ease;
}

.kg-action-primary {
	min-width: 9.5rem;
	background-color: var(--kg-orange);
	color: #161b22;
}
.kg-action-primary:hover { background-color: #ff785d; }
.kg-action-sso {
	width: min(100%, 19.5rem);
	background-color: #f7f9fb;
	color: #24272c;
}
.kg-action-sso:hover { background-color: #e6edf3; }
.kg-action-sso img { flex: none; object-fit: contain; }
.kg-arrow { font-size: 1.1rem; line-height: 1; }

.kg-entry a:focus-visible {
	outline: 2px solid #f7f9fb;
	outline-offset: 4px;
}

.kg-panel #flash-message:empty { display: none; }
.kg-panel .flash-message {
	width: 100%;
	padding: .75rem .95rem;
	border: 1px solid #e6edf32b;
	border-radius: .55rem;
	background-color: #1a212b;
	color: var(--kg-ink);
	font-size: .92rem;
	line-height: 1.5;
	overflow-wrap: anywhere;
}
.kg-panel .flash-message p { margin: 0; }
.kg-panel .flash-error { border-color: #f050327a; }
.kg-panel .flash-message a { color: inherit; }

.kg-footer {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: .5rem 1rem;
	padding: .85rem 1rem max(.85rem, env(safe-area-inset-bottom));
	color: var(--kg-muted);
	font-size: .8rem;
	line-height: 1.4;
}
.kg-footer a { color: inherit; text-underline-offset: .18em; }
.kg-footer a:hover { color: var(--kg-ink); }

@media (prefers-reduced-motion: reduce) {
	.kg-action { transition: none; }
}
