:root {
	color-scheme: light;
	font-family: "Segoe UI", sans-serif;
	--bg: #0f172a;
	--panel: #111827;
	--panel-soft: #1f2937;
	--text: #e5e7eb;
	--muted: #94a3b8;
	--accent: #fbbf24;
	--accent-strong: #f59e0b;
	--line: rgba(255, 255, 255, 0.08);
}

body {
	margin: 0;
	min-height: 100vh;
	background:
		radial-gradient(
			circle at top left,
			rgba(251, 191, 36, 0.18),
			transparent 34%
		),
		radial-gradient(
			circle at top right,
			rgba(59, 130, 246, 0.16),
			transparent 28%
		),
		linear-gradient(180deg, #020617 0%, var(--bg) 100%);
	color: var(--text);
	font-family: "Segoe UI", sans-serif;
}

.page-shell {
	max-width: 1120px;
	margin: 0 auto;
	padding: 2rem 1rem 4rem;
}

.hero,
.search-panel,
.results-section,
.stats-section {
	background: rgba(17, 24, 39, 0.9);
	border: 1px solid var(--line);
	backdrop-filter: blur(10px);
	border-radius: 24px;
	box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
	padding: 1.5rem;
	margin-bottom: 1.25rem;
}

.hero h1 {
	font-size: clamp(2.3rem, 5vw, 4.8rem);
	line-height: 0.95;
	max-width: 14ch;
	margin: 0.5rem 0 1rem;
}

.eyebrow,
.hint,
.road-meta p,
.stats-item p,
.intro,
.section-head span {
	color: var(--muted);
}

.fun-disclaimer {
	margin-top: 1rem;
	padding: 0.95rem 1rem;
	border-radius: 14px;
	border: 1px solid rgba(251, 191, 36, 0.35);
	background: rgba(251, 191, 36, 0.12);
	color: #f8fafc;
	font-size: 0.95rem;
	line-height: 1.45;
}

.fun-disclaimer strong {
	color: #fde68a;
}

.stats-link,
.back-link {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	text-decoration: none;
	font-weight: 800;
	letter-spacing: 0.02em;
	color: #0f172a;
	background: linear-gradient(135deg, var(--accent), #fde68a);
	padding: 0.85rem 1.15rem;
	border-radius: 999px;
	margin-bottom: 1rem;
	box-shadow: 0 12px 30px rgba(251, 191, 36, 0.25);
}

.search-label {
	display: block;
	font-weight: 700;
	margin-bottom: 0.75rem;
}

.search-row {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 0.75rem;
}

input[type="search"] {
	width: 100%;
	box-sizing: border-box;
	padding: 1rem 1.1rem;
	border-radius: 16px;
	border: 1px solid var(--line);
	background: var(--panel-soft);
	color: var(--text);
	font-size: 1rem;
}

input[type="search"]::placeholder {
	color: #64748b;
}

button {
	border: 0;
	border-radius: 16px;
	padding: 0.95rem 1.1rem;
	font-weight: 800;
	cursor: pointer;
	transition:
		transform 0.15s ease,
		box-shadow 0.15s ease,
		background 0.15s ease;
}

button:hover {
	transform: translateY(-1px);
}

#search-button {
	background: linear-gradient(135deg, var(--accent), var(--accent-strong));
	color: #111827;
	box-shadow: 0 14px 28px rgba(245, 158, 11, 0.28);
}

.section-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
}

.results,
.stats-list {
	display: grid;
	gap: 1rem;
}

.road-card,
.stats-item {
	background: rgba(15, 23, 42, 0.8);
	border: 1px solid var(--line);
	border-radius: 20px;
	padding: 1rem;
}

.road-card {
	display: grid;
	gap: 1rem;
}

.road-card.voted {
	border-color: rgba(251, 191, 36, 0.55);
	box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.25);
}

.road-meta h3,
.stats-item h2 {
	margin: 0 0 0.35rem;
}

.road-info-row {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 0.75rem;
}

.surface-text {
	margin: 0;
}

.speed-sign {
	width: 58px;
	height: 58px;
	border-radius: 999px;
	background: #ffffff;
	border: 6px solid #dc2626;
	display: grid;
	place-items: center;
	box-shadow:
		inset 0 0 0 2px #ffffff,
		0 6px 18px rgba(0, 0, 0, 0.18);
	flex-shrink: 0;
}

.speed-sign span {
	font-size: 1.05rem;
	line-height: 1;
	font-weight: 900;
	color: #111827;
}

.vote-block {
	display: grid;
	gap: 0.75rem;
}

.score-grid {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 0.5rem;
}

.score-button {
	padding: 0.7rem 0.5rem;
	background: #1f2937;
	color: var(--text);
	border: 1px solid var(--line);
}

.score-button:hover {
	background: #334155;
}

.score-button:disabled {
	cursor: not-allowed;
	opacity: 0.62;
	transform: none;
}

.score-button.score-selected {
	background: linear-gradient(135deg, var(--accent), var(--accent-strong));
	color: #111827;
	opacity: 1;
	box-shadow: 0 8px 20px rgba(245, 158, 11, 0.25);
}

.empty-state {
	min-height: 140px;
	display: grid;
	place-items: center;
	text-align: center;
	color: var(--muted);
	border: 1px dashed rgba(148, 163, 184, 0.24);
	border-radius: 18px;
	padding: 1.5rem;
}

.stats-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.stats-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.stats-item strong {
	font-size: 1.4rem;
	color: var(--accent);
}

.legal-footer {
	display: flex;
	justify-content: center;
	gap: 1rem;
	padding: 0.75rem 0 0.25rem;
}

.legal-footer a {
	color: var(--muted);
	text-decoration: none;
	font-size: 0.92rem;
	padding: 0.4rem 0.7rem;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: rgba(15, 23, 42, 0.55);
}

.legal-footer a:hover {
	color: #fde68a;
	border-color: rgba(251, 191, 36, 0.45);
}

.data-thanks {
	margin: 0.4rem 0 0;
	text-align: center;
	font-size: 0.82rem;
	color: var(--muted);
}

@media (max-width: 800px) {
	.search-row,
	.stats-item {
		grid-template-columns: 1fr;
		display: grid;
	}

	.stats-item strong {
		justify-self: start;
	}

	.score-grid {
		grid-template-columns: repeat(5, minmax(0, 1fr));
	}
}

@media (max-width: 560px) {
	.page-shell {
		padding: 1rem;
	}

	.hero,
	.search-panel,
	.results-section,
	.stats-section {
		padding: 1.1rem;
		border-radius: 18px;
	}

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