/* ===========================================================================
   Job Analyzer — brutalist design system (spec §9).
   No CSS framework. No gradients in content. No pastels. No border-radius.
   No blur. Motion is snap/steps only.
   Font faces are declared by the server (Topcoat `font!`), not here.
   =========================================================================== */

/* --- Tokens ---------------------------------------------------------------- */
:root {
	--bg: #0a0a0a;
	--fg: #f5f5f0;
	--green: #00c853;
	--red: #ff1744;
	--yellow: #ffd600;
	--border: 3px solid var(--fg);
	--shadow: 6px 6px 0;
	--mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", "Menlo", monospace;
	--display: "Archivo Black", var(--mono);
}

/* --- Reset ----------------------------------------------------------------- */
*,
*::before,
*::after {
	box-sizing: border-box;
	border-radius: 0 !important;
	margin: 0;
	padding: 0;
}

html {
	-webkit-text-size-adjust: 100%;
}

body {
	background: var(--bg);
	/* Faint graph-paper grid: layered ambience without color or blur. */
	background-image:
		repeating-linear-gradient(
			0deg,
			transparent,
			transparent 39px,
			rgba(245, 245, 240, 0.04) 39px,
			rgba(245, 245, 240, 0.04) 40px
		),
		repeating-linear-gradient(
			90deg,
			transparent,
			transparent 39px,
			rgba(245, 245, 240, 0.04) 39px,
			rgba(245, 245, 240, 0.04) 40px
		);
	color: var(--fg);
	font-family: var(--mono);
	font-size: 16px;
	line-height: 1.5;
	min-height: 100vh;
	overflow-x: hidden;
}

::selection {
	background: var(--green);
	color: var(--bg);
}

/* --- Motion ------------------------------------------------------------------
   One reveal primitive (stepped, no easing), staggered per element. Respects
   prefers-reduced-motion. */
@keyframes rise {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

.container {
	animation: rise 0.35s steps(5, end) both;
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

/* --- Layout ---------------------------------------------------------------- */
.container {
	max-width: 900px;
	margin: 0 auto;
	padding: 48px 24px 96px;
	text-align: left;
}

.display {
	font-family: var(--display);
	font-size: clamp(40px, 9vw, 80px);
	line-height: 0.95;
	letter-spacing: -0.02em;
	text-transform: uppercase;
	margin-bottom: 16px;
}

.tagline {
	max-width: 60ch;
	margin-bottom: 32px;
	color: var(--fg);
	opacity: 0.85;
}

.section {
	border-top: var(--border);
	padding: 20px 0;
}
.section:first-child {
	border-top: none;
}

.section-label {
	display: block;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.18em;
	opacity: 0.7;
	margin-bottom: 10px;
}

/* --- Forms ----------------------------------------------------------------- */
.analyze-form {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	border: var(--border);
	padding: 16px;
	box-shadow: var(--shadow) var(--fg);
	margin-bottom: 24px;
}

.url-input {
	flex: 1 1 320px;
	background: var(--bg);
	color: var(--green);
	border: var(--border);
	font-family: var(--mono);
	font-size: 16px;
	padding: 12px 14px;
	caret-color: var(--green);
}
.url-input::placeholder {
	color: var(--green);
	opacity: 0.4;
}
.url-input:focus {
	outline: none;
	box-shadow: var(--shadow) var(--green);
}

/* --- Buttons --------------------------------------------------------------- */
.btn {
	display: inline-block;
	background: var(--fg);
	color: var(--bg);
	border: var(--border);
	font-family: var(--mono);
	font-weight: 700;
	font-size: 16px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	padding: 12px 20px;
	cursor: pointer;
	text-decoration: none;
	text-align: center;
	box-shadow: var(--shadow) var(--green);
	/* No color/background transitions — snap only. Transform micro-interaction. */
	transition: transform 80ms steps(2, end);
}
.btn:hover {
	transform: translate(-2px, -2px);
}
.btn:active {
	transform: translate(4px, 4px);
	box-shadow: none;
}
.btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	box-shadow: none;
	transform: none;
}
.btn-secondary {
	background: var(--bg);
	color: var(--fg);
	box-shadow: var(--shadow) var(--fg);
}

/* Action rows under cards / panels. */
.result-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
}
.result-actions {
	margin-bottom: 32px;
}

/* --- Messages -------------------------------------------------------------- */
.error-msg {
	color: var(--red);
	border-left: 6px solid var(--red);
	padding: 8px 12px;
	margin: 16px 0;
}
/* --- Analysis card --------------------------------------------------------- */
.analysis-card {
	border: var(--border);
	box-shadow: var(--shadow) var(--fg);
	margin-bottom: 32px;
}
.analysis-card .section {
	padding: 20px;
	animation: rise 0.4s steps(5, end) both;
}
.analysis-card .section:nth-child(2) {
	animation-delay: 60ms;
}
.analysis-card .section:nth-child(3) {
	animation-delay: 120ms;
}
.analysis-card .section:nth-child(4) {
	animation-delay: 180ms;
}
.analysis-card .section:nth-child(5) {
	animation-delay: 240ms;
}
.analysis-card .section:nth-child(6) {
	animation-delay: 300ms;
}

/* Small footnote under each analysis card: LLM-generated, may be wrong. */
.card-disclaimer {
	border-top: var(--border);
	padding: 14px 20px 18px;
	font-size: 12px;
	line-height: 1.6;
	opacity: 0.5;
	max-width: 70ch;
}

.prose {
	max-width: 70ch;
}

.url {
	word-break: break-all;
	opacity: 0.8;
}

/* The deliberately-undervalued number — loud on purpose. */
.salary-estimate {
	color: var(--yellow);
	font-weight: 700;
}

/* --- Rating ---------------------------------------------------------------- */
.rating {
	font-family: var(--display);
	font-size: 96px;
	line-height: 1;
	display: inline-block;
}
.rating-scale {
	display: block;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.18em;
	opacity: 0.6;
	margin-top: 6px;
}
.rating-low {
	color: var(--red);
	text-shadow: var(--shadow) var(--red);
}
.rating-mid {
	color: var(--yellow);
	text-shadow: var(--shadow) var(--yellow);
}
.rating-high {
	color: var(--green);
	text-shadow: var(--shadow) var(--green);
}

/* --- Flags ----------------------------------------------------------------- */
.flags {
	list-style: none;
}
.flags li {
	border-left: 6px solid;
	padding: 8px 12px;
	margin-bottom: 8px;
	transition: transform 80ms steps(2, end);
}
.flags li:hover {
	transform: translateX(6px);
}
.flags-green li {
	border-left-color: var(--green);
}
.flags-green li::before {
	content: "\2713  ";
	color: var(--green);
	font-weight: 700;
}
.flags-red li {
	border-left-color: var(--red);
}
.flags-red li::before {
	content: "\2717  ";
	color: var(--red);
	font-weight: 700;
}

/* --- Pending state --------------------------------------------------------- */
.cursor {
	color: var(--green);
	animation: blink 1s step-end infinite;
	margin-left: 4px;
}
@keyframes blink {
	0%,
	100% {
		opacity: 1;
	}
	50% {
		opacity: 0;
	}
}

.failed .display {
	color: var(--red);
}
.timeout .display {
	color: var(--yellow);
}

/* --- Footer ---------------------------------------------------------------- */
.site-footer {
	max-width: 900px;
	margin: 0 auto;
	padding: 0 24px 48px;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 24px;
	justify-content: space-between;
	font-size: 12px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	opacity: 0.5;
}

/* --- Responsive ------------------------------------------------------------ */
@media (max-width: 600px) {
	.container {
		padding: 24px 16px 64px;
	}
	.analyze-form {
		flex-direction: column;
	}
	.btn,
	.url-input {
		width: 100%;
	}
	.rating {
		font-size: 72px;
	}
	.site-footer {
		padding: 0 16px 32px;
	}
}
