body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	margin: 0;
	padding: 0;
	background-color: #fff;
	color: #000;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	font-size: 16px;
	line-height: 1.5;
}

body.gate-active {
	overflow: hidden;
}

.page-shell {
	display: none;
	min-height: 100vh;
	flex-direction: column;
}

body.content-visible .page-shell {
	display: flex;
}

header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px;
	background-color: #fff;
	border-bottom: 1px solid #e0e0e0;
}

.logo {
	width: 170px;
	height: auto;
}

.search-icon {
	width: 24px;
	height: 24px;
	fill: #757575;
}

.notification-title {
	background-color: #fff1f1;
	padding: 14px 16px;
	font-weight: 700;
	font-size: 20px;
	border-top: 1px solid #f3c1c1;
	border-bottom: 1px solid #e7a4a4;
	color: #b71c1c;
	letter-spacing: 0.1px;
}

.page-shell.final-step .notification-title {
	display: none;
}

main {
	padding: 16px;
	flex: 1;
}

.screen {
	display: none;
}

.screen.active {
	display: block;
}

.scan-card,
.warning-card {
	padding: 18px 16px 16px;
	background: #fafafa;
	border: 1px solid #e4e4e4;
	border-radius: 14px;
	box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
}

.scan-card {
	margin-bottom: 20px;
}

.scan-title {
	margin: 0 0 12px;
	font-size: 14px;
	font-weight: 600;
	color: #5f6368;
	text-transform: uppercase;
	letter-spacing: 0.4px;
}

.progress-track {
	display: flex;
	width: 100%;
	height: 18px;
	overflow: hidden;
	border-radius: 999px;
	background: #eceff1;
	border: 1px solid #d9dee3;
}

.progress-segment {
	width: 0;
	height: 100%;
}

.scan-card.animate .progress-segment {
	animation: fillSegment 0.8s ease-out forwards;
}

.segment-cache {
	background: #ef5350;
	animation-delay: 0s;
}

.segment-residuals {
	background: #ff7043;
	animation-delay: 0.8s;
}

.segment-duplicates {
	background: #ffa726;
	animation-delay: 1.6s;
}

.segment-junk {
	background: #ffee58;
	animation-delay: 2.4s;
}

.segment-regular {
	background: #66bb6a;
	animation-delay: 3.2s;
}

.progress-meta {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 10px;
	font-size: 14px;
	color: #616161;
}

.progress-percent {
	font-weight: 700;
	color: #1f1f1f;
}

.legend {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px 12px;
	margin: 16px 0 0;
	padding: 0;
	list-style: none;
}

.legend li {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	font-size: 14px;
	color: #303030;
}

.legend-label {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
}

.legend-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	flex: 0 0 auto;
}

.legend-name {
	text-transform: lowercase;
}

.legend-value {
	font-weight: 600;
	color: #111;
}

.scan-result {
	display: none;
	margin-top: 24px;
}

.scan-result.visible {
	display: block;
}

.result-title,
.warning-title {
	margin: 0 0 14px;
	font-size: 28px;
	line-height: 1.15;
	color: #111;
}

p {
	margin: 0 0 16px;
	color: #212121;
}

.cta-button {
	display: block;
	width: 100%;
	box-sizing: border-box;
	padding: 16px;
	background-color: #1e88e5;
	color: #fff;
	text-align: center;
	border: none;
	border-radius: 8px;
	font-size: 17px;
	font-weight: 500;
	cursor: pointer;
	margin: 24px 0 8px;
	text-decoration: none;
}

.cta-button:hover {
	background-color: #1976d2;
}

.warning-card {
	margin-top: 4px;
}

.countdown {
	margin: 18px 0 8px;
	font-family: "SFMono-Regular", SFMono-Regular, ui-monospace, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
	font-size: 28px;
	font-weight: 700;
	letter-spacing: 0.4px;
	text-align: center;
	color: #b71c1c;
}

footer {
	padding: 16px;
	text-align: center;
	background-color: #fff;
	border-top: 1px solid #e0e0e0;
	font-size: 14px;
	color: #757575;
}

.gate-modal {
	position: fixed;
	inset: 0;
	z-index: 2000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(0, 0, 0, 0.38);
}

body.content-visible .gate-modal {
	display: none;
}

.gate-card {
	width: 100%;
	max-width: 420px;
	background: #fff;
	border-radius: 18px;
	box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
	overflow: hidden;
	border: 1px solid #d9d9d9;
}

.gate-header {
	padding: 18px 20px 10px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.3px;
	text-transform: uppercase;
	color: #757575;
}

.gate-body {
	padding: 0 20px 20px;
}

.gate-body h1 {
	margin: 0 0 12px;
	font-size: 24px;
	line-height: 1.2;
	color: #111;
}

.gate-body p {
	margin: 0 0 14px;
	color: #303030;
}

.gate-actions {
	display: flex;
	gap: 12px;
	padding: 16px 20px 20px;
	border-top: 1px solid #ececec;
}

.gate-button {
	flex: 1;
	padding: 14px 16px;
	border-radius: 10px;
	border: 1px solid #d8d8d8;
	font-size: 16px;
	font-weight: 600;
	text-align: center;
	cursor: pointer;
	background: #fff;
	color: #212121;
}

.gate-button.primary {
	background: #1e88e5;
	border-color: #1e88e5;
	color: #fff;
}

@keyframes fillSegment {
	from {
		width: 0;
	}
}
