:root {
	--atlas-bg: #080808;
	--atlas-bg-soft: #121212;
	--atlas-panel: rgba(22, 22, 22, 0.9);
	--atlas-panel-strong: rgba(12, 12, 12, 0.96);
	--atlas-border: rgba(255, 255, 255, 0.1);
	--atlas-border-strong: rgba(255, 255, 255, 0.2);
	--atlas-text: #f5f5f5;
	--atlas-muted: #a3a3a3;
	--atlas-accent: #ececec;
	--atlas-accent-strong: #cfcfcf;
	--atlas-warm: #bdbdbd;
	--atlas-danger: #8f8f8f;
	--atlas-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
	--atlas-radius-lg: 28px;
	--atlas-radius-md: 20px;
	--atlas-radius-sm: 14px;
	--bs-body-bg: var(--atlas-bg);
	--bs-body-color: var(--atlas-text);
	--bs-border-color: var(--atlas-border);
	--bs-secondary-color: var(--atlas-muted);
	--bs-primary: var(--atlas-accent);
	--bs-primary-rgb: 236, 236, 236;
	--bs-font-sans-serif: "IBM Plex Sans", "Segoe UI", sans-serif;
}

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	min-height: 100vh;
	background: var(--atlas-bg);
	color: var(--atlas-text);
	font-family: var(--bs-font-sans-serif);
}

body::before {
	position: fixed;
	inset: 0;
	z-index: -1;
	background-image:
		linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
	background-size: 32px 32px;
	content: "";
	-webkit-mask-image: linear-gradient(
		180deg,
		rgba(0, 0, 0, 0.7),
		transparent 92%
	);
	mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.7), transparent 92%);
}

a {
	color: inherit;
}

.skip-link {
	position: absolute;
	left: 16px;
	top: -48px;
	z-index: 1000;
	padding: 0.75rem 1rem;
	border-radius: 999px;
	background: #ffffff;
	color: #000000;
}

.skip-link:focus {
	top: 16px;
}

.page-shell {
	padding-bottom: 4rem;
}

.hero-section {
	padding: 2rem 0 1.5rem;
}

.hero-grid {
	display: grid;
	gap: 1.25rem;
	grid-template-columns: minmax(0, 1fr);
}

.surface-panel {
	position: relative;
	overflow: hidden;
	padding: 1.4rem;
	border: 1px solid var(--atlas-border);
	border-radius: var(--atlas-radius-md);
	background: var(--atlas-panel);
	-webkit-backdrop-filter: blur(18px);
	backdrop-filter: blur(18px);
	box-shadow: var(--atlas-shadow);
}

.surface-panel::after {
	position: absolute;
	inset: auto -20% -40% auto;
	width: 220px;
	height: 220px;
	border-radius: 50%;
	background: radial-gradient(
		circle,
		rgba(255, 255, 255, 0.05),
		transparent 68%
	);
	content: "";
	pointer-events: none;
}

.surface-panel-lg {
	padding: clamp(1.5rem, 2vw, 2rem);
}

.eyebrow,
.tiny-label {
	letter-spacing: 0.14em;
	font-size: 0.72rem;
	font-weight: 700;
	color: #d0d0d0;
}

.tiny-label {
	margin-bottom: 0.45rem;
}

h1,
h2,
h3,
.aside-heading,
.metric-tile strong,
.repo-name {
	font-family: "Space Grotesk", var(--bs-font-sans-serif);
}

h1 {
	margin: 0;
	font-size: clamp(2.6rem, 6vw, 4.75rem);
	line-height: 0.95;
}

h2 {
	margin: 0;
	font-size: clamp(1.4rem, 2.2vw, 2rem);
}

.hero-description,
.section-copy,
.repo-description,
.category-description,
.active-summary,
.aside-list,
.status-banner,
.generated-note,
.repo-meta {
	color: var(--atlas-muted);
}

.hero-description {
	max-width: 60ch;
	margin: 1rem 0 0;
	font-size: 1.02rem;
}

.hero-meta {
	display: grid;
	gap: 0.9rem;
	margin-top: 1.5rem;
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric-tile {
	padding: 1rem;
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 18px;
	background: rgba(255, 255, 255, 0.03);
}

.metric-label {
	display: block;
	color: var(--atlas-muted);
	font-size: 0.82rem;
}

.metric-tile strong {
	display: block;
	margin-top: 0.4rem;
	font-size: 1.35rem;
}

.hero-actions {
	display: flex;
	gap: 0.9rem;
	margin-top: 1.5rem;
	flex-wrap: wrap;
}

.atlas-btn-primary,
.atlas-btn-secondary {
	padding: 0.85rem 1.1rem;
	border-radius: 999px;
	font-weight: 700;
}

.atlas-btn-primary {
	border: none;
	background: linear-gradient(135deg, #f3f3f3 0%, #cfcfcf 100%);
	color: #050505;
}

.atlas-btn-primary:hover,
.atlas-btn-primary:focus-visible {
	color: #050505;
	filter: brightness(1.05);
}

.atlas-btn-secondary {
	border: 1px solid var(--atlas-border-strong);
	background: rgba(255, 255, 255, 0.04);
	color: var(--atlas-text);
}

.stack-badge,
.loading-chip,
.status-banner,
.count-pill,
.topic-pill,
.meta-pill {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	border-radius: 999px;
}

.status-banner {
	padding: 0.85rem 0.95rem;
	border: 1px solid rgba(255, 255, 255, 0.08);
	background: rgba(255, 255, 255, 0.04);
}

.status-banner.busy {
	border-color: rgba(255, 255, 255, 0.2);
	color: var(--atlas-text);
}

.status-banner.error {
	border-color: rgba(255, 255, 255, 0.2);
	color: #f0f0f0;
}

.controls-section,
.category-nav {
	margin-top: 1.25rem;
}

.controls-section {
	overflow: visible;
	position: relative;
	z-index: 20;
}

.controls-section::after {
	display: none;
}

.section-head,
.results-header {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	align-items: end;
}

.compact-head {
	margin-bottom: 1rem;
}

.controls-grid {
	margin-top: 0.5rem;
}

.atlas-input,
.atlas-select {
	min-height: 3.25rem;
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 16px;
	background: rgba(255, 255, 255, 0.04);
	color: var(--atlas-text);
}

.atlas-select.is-enhanced {
	display: none;
}

.atlas-select-shell {
	position: relative;
}

.atlas-select-trigger {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	min-height: 3.25rem;
	padding: 0.75rem 1rem;
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 16px;
	background:
		linear-gradient(
			180deg,
			rgba(255, 255, 255, 0.03),
			rgba(255, 255, 255, 0.01)
		),
		rgba(255, 255, 255, 0.04);
	color: var(--atlas-text);
	text-align: left;
	transition:
		background-color 180ms ease,
		border-color 180ms ease,
		box-shadow 180ms ease;
	cursor: pointer;
}

.atlas-select-trigger:hover {
	border-color: rgba(255, 255, 255, 0.16);
	background-color: rgba(255, 255, 255, 0.06);
}

.atlas-select-trigger:focus-visible {
	outline: none;
	border-color: var(--atlas-border-strong);
	box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.08);
}

.atlas-select-trigger-label {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.atlas-select-trigger-icon {
	flex: 0 0 auto;
	width: 1rem;
	height: 1rem;
	margin-left: 0.75rem;
	opacity: 0.84;
	transition: transform 180ms ease;
}

.atlas-select-shell.open .atlas-select-trigger-icon {
	transform: rotate(180deg);
}

.atlas-select-menu {
	position: absolute;
	top: calc(100% + 0.5rem);
	left: 0;
	right: 0;
	z-index: 60;
	display: grid;
	gap: 0.35rem;
	padding: 0.45rem;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 18px;
	background: rgba(10, 10, 10, 0.98);
	box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
	-webkit-backdrop-filter: blur(18px);
	backdrop-filter: blur(18px);
	max-height: min(18rem, 50vh);
	overflow-x: hidden;
	overflow-y: auto;
	overscroll-behavior: contain;
	opacity: 0;
	transform: translateY(-0.25rem);
	pointer-events: none;
	transition:
		opacity 160ms ease,
		transform 160ms ease;
}

.atlas-select-menu::-webkit-scrollbar {
	width: 10px;
}

.atlas-select-menu::-webkit-scrollbar-track {
	background: transparent;
}

.atlas-select-menu::-webkit-scrollbar-thumb {
	border: 2px solid transparent;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.16);
	background-clip: padding-box;
}

.atlas-select-menu::-webkit-scrollbar-thumb:hover {
	background: rgba(255, 255, 255, 0.24);
	background-clip: padding-box;
}

.atlas-select-shell.open .atlas-select-menu {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

.atlas-select-option {
	display: flex;
	align-items: center;
	width: 100%;
	padding: 0.8rem 0.9rem;
	border: 1px solid transparent;
	border-radius: 14px;
	background: rgba(255, 255, 255, 0.02);
	color: var(--atlas-text);
	text-align: left;
	transition:
		background 160ms ease,
		border-color 160ms ease;
	cursor: pointer;
}

.atlas-select-option:hover,
.atlas-select-option:focus-visible {
	outline: none;
	border-color: rgba(255, 255, 255, 0.1);
	background: rgba(255, 255, 255, 0.06);
}

.atlas-select-option.is-selected {
	border-color: rgba(255, 255, 255, 0.14);
	background: rgba(255, 255, 255, 0.08);
	color: #ffffff;
}

.atlas-select {
	padding-right: 3rem;
	-moz-appearance: none;
	-webkit-appearance: none;
	appearance: none;
	color-scheme: dark;
	background-color: rgba(255, 255, 255, 0.04);
	background-image:
		linear-gradient(
			180deg,
			rgba(255, 255, 255, 0.03),
			rgba(255, 255, 255, 0.01)
		),
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6.5 8 10.5 12 6.5' stroke='%23d7d7d7' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat, no-repeat;
	background-position:
		0 0,
		right 1rem center;
	background-size: auto, 1rem;
	cursor: pointer;
	transition:
		background-color 180ms ease,
		border-color 180ms ease,
		box-shadow 180ms ease;
}

.atlas-select:hover {
	border-color: rgba(255, 255, 255, 0.16);
	background-color: rgba(255, 255, 255, 0.06);
}

.atlas-select option,
.atlas-select optgroup {
	background: #101010;
	color: #f5f5f5;
}

.atlas-select optgroup {
	font-weight: 700;
}

.atlas-select option {
	padding: 0.55rem 0.75rem;
	background: #141414;
	color: #f5f5f5;
}

.atlas-select option:checked,
.atlas-select option:hover,
.atlas-select option:focus {
	background: #242424;
	color: #ffffff;
}

.atlas-input::placeholder {
	color: rgba(158, 171, 192, 0.78);
}

.atlas-input:focus,
.atlas-select:focus {
	border-color: var(--atlas-border-strong);
	background: rgba(255, 255, 255, 0.05);
	box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.08);
	color: var(--atlas-text);
}

.active-summary {
	margin-top: 1rem;
}

.pill-row {
	display: flex;
	gap: 0.75rem;
	flex-wrap: wrap;
}

.category-pill {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	padding: 0.72rem 1rem;
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.03);
	color: var(--atlas-text);
	font-weight: 600;
	cursor: pointer;
	transition:
		background 180ms ease,
		border-color 180ms ease;
}

.category-pill:hover {
	border-color: rgba(255, 255, 255, 0.12);
	background: rgba(255, 255, 255, 0.05);
}

.category-pill.active {
	border-color: rgba(255, 255, 255, 0.22);
	background: rgba(255, 255, 255, 0.08);
}

.count-pill {
	padding: 0.1rem 0.45rem;
	background: rgba(255, 255, 255, 0.08);
	font-size: 0.82rem;
}

.results-shell {
	margin-top: 1.5rem;
}

.loading-chip {
	padding: 0.45rem 0.8rem;
	border: 1px solid rgba(255, 255, 255, 0.08);
	background: rgba(255, 255, 255, 0.04);
	color: var(--atlas-muted);
}

.sections-root {
	display: grid;
	gap: 1.3rem;
	margin-top: 1rem;
	min-width: 0;
}

.category-section {
	position: relative;
	overflow: hidden;
	min-width: 0;
	padding: 1.35rem;
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: var(--atlas-radius-lg);
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent),
		rgba(14, 14, 14, 0.94);
	box-shadow: var(--atlas-shadow);
	transition:
		background 180ms ease,
		border-color 180ms ease;
	animation: fade-up 420ms ease both;
}

.category-section:hover {
	border-color: rgba(255, 255, 255, 0.1);
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.028), transparent),
		rgba(18, 18, 18, 0.96);
}

.category-head {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	align-items: start;
	margin-bottom: 1rem;
}

.category-copy h3 {
	margin: 0;
	font-size: clamp(1.3rem, 2vw, 1.8rem);
}

.category-description {
	margin: 0.55rem 0 0;
	max-width: 70ch;
}

.repo-grid {
	display: grid;
	gap: 1rem;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	min-width: 0;
}

.repo-card {
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
	min-width: 0;
	overflow: hidden;
	min-height: 100%;
	padding: 1rem;
	border: 1px solid rgba(255, 255, 255, 0.07);
	border-radius: 22px;
	background: rgba(255, 255, 255, 0.028);
	transition:
		transform 180ms ease,
		border-color 180ms ease,
		background 180ms ease;
}

.repo-card:hover {
	border-color: rgba(255, 255, 255, 0.18);
	background: rgba(255, 255, 255, 0.05);
}

.repo-card > * {
	min-width: 0;
}

.repo-anchor {
	display: block;
	max-width: 100%;
	min-width: 0;
	text-decoration: none;
}

.repo-name {
	margin: 0;
	font-size: 1.08rem;
	line-height: 1.2;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.repo-description {
	margin: 0;
	line-height: 1.55;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.repo-badges,
.repo-topics {
	display: flex;
	gap: 0.45rem;
	flex-wrap: wrap;
}

.meta-pill,
.topic-pill {
	min-width: 0;
	padding: 0.35rem 0.6rem;
	border: 1px solid rgba(255, 255, 255, 0.08);
	background: rgba(255, 255, 255, 0.03);
	font-size: 0.8rem;
	color: var(--atlas-muted);
	overflow-wrap: anywhere;
	word-break: break-word;
}

.meta-pill.language {
	color: var(--atlas-accent);
	border-color: rgba(255, 255, 255, 0.14);
}

.meta-pill.archived {
	color: #d5d5d5;
	border-color: rgba(255, 255, 255, 0.14);
}

.topic-pill {
	color: #d9e4f3;
}

.repo-footer {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	align-items: center;
	min-width: 0;
	margin-top: auto;
	font-size: 0.86rem;
}

.repo-meta {
	display: flex;
	gap: 0.9rem;
	flex-wrap: wrap;
	min-width: 0;
}

.empty-state,
.noscript-banner {
	padding: 1.4rem;
	border: 1px dashed rgba(255, 255, 255, 0.14);
	border-radius: var(--atlas-radius-md);
	background: rgba(255, 255, 255, 0.03);
}

.empty-state h3 {
	margin-top: 0;
}

.load-sentinel {
	height: 12px;
}

@keyframes fade-up {
	from {
		opacity: 0;
		transform: translateY(12px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (max-width: 991px) {
	.hero-grid {
		grid-template-columns: 1fr;
	}

	.hero-meta {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.section-head,
	.results-header,
	.category-head {
		flex-direction: column;
		align-items: start;
	}
}

@media (max-width: 575px) {
	.hero-section {
		padding-top: 1rem;
	}

	.hero-meta {
		grid-template-columns: 1fr;
	}

	.surface-panel,
	.category-section {
		padding: 1rem;
	}

	.repo-grid {
		grid-template-columns: 1fr;
	}

	.hero-actions {
		flex-direction: column;
	}
}
