:root {
	--bg: #f3f6ee;
	--bg-deep: #dde7ce;
	--ink: #1d2b1f;
	--ink-soft: #425646;
	--panel: #fefcf7;
	--line: #b4c5a0;
	--accent: #ff6b2c;
	--accent-strong: #d84f16;
	--focus: #2463eb;
	--shadow: 0 14px 40px rgba(39, 53, 25, 0.18);
}

* {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	min-height: 100%;
}

body {
	position: relative;
	overflow-x: hidden;
	font-family: "Manrope", "Segoe UI", sans-serif;
	color: var(--ink);
	background:
		radial-gradient(circle at 16% 14%, #fff5df 0, transparent 32%),
		radial-gradient(circle at 84% 86%, #d9f0ff 0, transparent 28%),
		linear-gradient(150deg, var(--bg) 0%, var(--bg-deep) 100%);
}

.background-glow {
	position: fixed;
	width: 320px;
	height: 320px;
	border-radius: 50%;
	pointer-events: none;
	filter: blur(55px);
	opacity: 0.45;
	z-index: 0;
}

.background-glow-a {
	top: -70px;
	left: -60px;
	background: #ffd9ae;
	animation: drift-a 11s ease-in-out infinite alternate;
}

.background-glow-b {
	right: -65px;
	bottom: -75px;
	background: #b7dfff;
	animation: drift-b 13s ease-in-out infinite alternate;
}

.app-shell {
	position: relative;
	z-index: 1;
	width: min(1060px, 94vw);
	margin: 2rem auto;
	background: color-mix(in srgb, var(--panel) 90%, white);
	border: 1px solid color-mix(in srgb, var(--line) 65%, white);
	border-radius: 24px;
	box-shadow: var(--shadow);
	padding: clamp(1rem, 3vw, 2rem);
	display: grid;
	gap: 1rem;
}

.hero {
	border-radius: 18px;
	padding: clamp(1rem, 2vw, 1.4rem);
	background:
		repeating-linear-gradient(
			-45deg,
			rgba(255, 107, 44, 0.08),
			rgba(255, 107, 44, 0.08) 10px,
			rgba(255, 255, 255, 0.35) 10px,
			rgba(255, 255, 255, 0.35) 20px
		),
		#fffdf8;
	border: 1px solid #f0d9c3;
}

.eyebrow {
	margin: 0;
	font-family: "Space Grotesk", "Segoe UI", sans-serif;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	font-size: 0.76rem;
	color: #7a3f23;
}

.hero h1 {
	margin: 0.4rem 0 0;
	font-family: "Space Grotesk", "Segoe UI", sans-serif;
	line-height: 1.08;
	font-size: clamp(1.5rem, 4vw, 2.35rem);
}

.subhead {
	margin: 0.65rem 0 0;
	color: var(--ink-soft);
}

.search-panel,
.result-panel {
	border: 1px solid #d8e3cd;
	border-radius: 18px;
	background: #fcfff8;
	padding: 1rem;
}

.search-form {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 0.6rem;
}

.search-form input {
	border-radius: 12px;
	border: 1px solid #b8c8a8;
	background: #fff;
	color: var(--ink);
	font-size: 1rem;
	padding: 0.78rem 0.9rem;
}

.search-form input:focus-visible,
.engine-btn:focus-visible,
.external-link:focus-visible,
.search-form button:focus-visible {
	outline: 3px solid color-mix(in srgb, var(--focus) 58%, white);
	outline-offset: 1px;
}

.search-form button {
	border: none;
	border-radius: 12px;
	padding: 0.78rem 1.05rem;
	background: linear-gradient(150deg, var(--accent) 0%, #ff8c4f 100%);
	color: #1f1307;
	font-weight: 700;
	cursor: pointer;
}

.search-form button:hover {
	background: linear-gradient(150deg, var(--accent-strong) 0%, #ff7c3f 100%);
}

.engine-buttons {
	margin-top: 0.8rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.engine-btn {
	border: 1px solid #b5c5a2;
	background: #f3f9ea;
	color: #2f4730;
	padding: 0.44rem 0.74rem;
	border-radius: 999px;
	cursor: pointer;
	font-weight: 700;
}

.engine-btn.active {
	border-color: #1f4f8b;
	background: #e0f0ff;
	color: #15365d;
}

.status-row {
	margin-top: 0.8rem;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
}

.status-text {
	margin: 0;
	color: #304435;
}

.external-link {
	text-decoration: none;
	color: #0f58bb;
	font-weight: 700;
}

.external-link:hover {
	text-decoration: underline;
}

.result-panel {
	min-height: 40vh;
	display: grid;
	gap: 0.9rem;
}

.action-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem;
}

.action-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.3rem;
	padding: 0.45rem 0.8rem;
	border: 1px solid #adc0a4;
	border-radius: 12px;
	background: #edf9e4;
	text-decoration: none;
}

.action-btn {
	font: inherit;
	color: #0f58bb;
	font-weight: 700;
	cursor: pointer;
}

.action-btn:disabled {
	pointer-events: none;
	opacity: 0.55;
}

.disabled-link {
	pointer-events: none;
	opacity: 0.55;
}

.results-copy h2 {
	margin: 0;
	font-size: 1.08rem;
	font-family: "Space Grotesk", "Segoe UI", sans-serif;
}

.results-copy p {
	margin: 0;
	color: #415248;
}

.result-links {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.55rem;
}

.result-links li {
	border: 1px solid #c9d8ba;
	background: #fafdfe;
	border-radius: 12px;
	padding: 0.62rem 0.8rem;
}

.result-links a {
	font-weight: 700;
	color: #134d9f;
	text-decoration: none;
}

.result-links a:hover {
	text-decoration: underline;
}

.result-meta {
	margin: 0.28rem 0 0;
	font-size: 0.9rem;
	color: #4d5d50;
}

.hidden {
	display: none;
}

.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@keyframes drift-a {
	from {
		transform: translate(0, 0) scale(1);
	}
	to {
		transform: translate(20px, 30px) scale(1.08);
	}
}

@keyframes drift-b {
	from {
		transform: translate(0, 0) scale(1);
	}
	to {
		transform: translate(-20px, -25px) scale(1.08);
	}
}

@media (max-width: 720px) {
	.app-shell {
		margin: 1rem auto;
		padding: 0.75rem;
	}

	.search-form {
		grid-template-columns: 1fr;
	}

	.search-form button {
		width: 100%;
	}

	.result-panel {
		min-height: 68vh;
	}
}
