/*
 * SecurityExpertUK — C-Suite Exposure Diagnostic
 * Design direction: a classified operations briefing, not a marketing quiz.
 * Dark charcoal-navy field, a single brass/clearance-gold accent, a slab
 * serif for authority, monospace for the numbers — like a redacted dossier
 * with a live threat-gauge stamped into it.
 */

@import url('https://fonts.googleapis.com/css2?family=Zilla+Slab:wght@500;700&family=IBM+Plex+Mono:wght@500;600&family=Inter:wght@400;500;600&display=swap');

.secx-diag {
	--secx-ink: #0B1220;
	--secx-panel: #121B2E;
	--secx-line: rgba(232, 234, 238, 0.14);
	--secx-paper: #E8EAEE;
	--secx-muted: #8C97AC;
	--secx-accent: #C9A24B;
	--secx-red: #B23A2E;
	--secx-amber: #D9A441;
	--secx-green: #4C9A6A;

	--secx-font-display: 'Zilla Slab', Georgia, serif;
	--secx-font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
	--secx-font-mono: 'IBM Plex Mono', 'SFMono-Regular', Menlo, monospace;

	font-family: var(--secx-font-body);
	color: var(--secx-paper);
	max-width: 640px;
	margin: 0 auto;
}

.secx-diag * {
	box-sizing: border-box;
}

.secx-diag__panel {
	position: relative;
	background: var(--secx-ink);
	border: 1px solid var(--secx-line);
	border-radius: 4px;
	padding: 48px 40px;
	overflow: hidden;
}

/* Clearance-stamp corner brackets — the signature detail. */
.secx-diag__panel::before,
.secx-diag__panel::after {
	content: '';
	position: absolute;
	width: 18px;
	height: 18px;
	border: 2px solid var(--secx-accent);
	opacity: 0.85;
}
.secx-diag__panel::before {
	top: 14px;
	left: 14px;
	border-right: none;
	border-bottom: none;
}
.secx-diag__panel::after {
	bottom: 14px;
	right: 14px;
	border-left: none;
	border-top: none;
}

.secx-diag__eyebrow {
	font-family: var(--secx-font-mono);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.14em;
	color: var(--secx-accent);
	margin: 0 0 14px;
	text-transform: uppercase;
}

.secx-diag__headline {
	font-family: var(--secx-font-display);
	font-weight: 700;
	font-size: clamp(28px, 4vw, 38px);
	line-height: 1.15;
	margin: 0 0 14px;
}

.secx-diag__sub {
	font-size: 16px;
	line-height: 1.6;
	color: var(--secx-muted);
	margin: 0 0 32px;
	max-width: 46ch;
}

.secx-diag__btn {
	font-family: var(--secx-font-body);
	font-weight: 600;
	font-size: 15px;
	letter-spacing: 0.01em;
	padding: 14px 28px;
	border-radius: 3px;
	border: 1px solid transparent;
	cursor: pointer;
	transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.secx-diag__btn:focus-visible {
	outline: 2px solid var(--secx-accent);
	outline-offset: 2px;
}

.secx-diag__btn--start,
.secx-diag__btn--submit {
	background: var(--secx-accent);
	color: var(--secx-ink);
}
.secx-diag__btn--start:hover,
.secx-diag__btn--submit:hover {
	transform: translateY(-1px);
}

.secx-diag__btn--answer {
	background: transparent;
	color: var(--secx-paper);
	border-color: var(--secx-line);
	min-width: 120px;
	font-family: var(--secx-font-mono);
}
.secx-diag__btn--answer:hover {
	border-color: var(--secx-accent);
	color: var(--secx-accent);
}

/* ---------- Quiz screen ---------- */

.secx-diag__progress {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 28px;
}
.secx-diag__progress-track {
	flex: 1;
	height: 3px;
	background: var(--secx-line);
	border-radius: 2px;
	overflow: hidden;
}
.secx-diag__progress-fill {
	height: 100%;
	width: 0%;
	background: var(--secx-accent);
	transition: width 0.3s ease;
}
.secx-diag__progress-label {
	font-family: var(--secx-font-mono);
	font-size: 12px;
	color: var(--secx-muted);
	white-space: nowrap;
}

.secx-diag__question-text {
	font-family: var(--secx-font-display);
	font-size: clamp(20px, 3vw, 26px);
	line-height: 1.4;
	margin: 0 0 32px;
	min-height: 2.8em;
}

.secx-diag__answers {
	display: flex;
	gap: 16px;
}

/* ---------- Gate form ---------- */

.secx-diag__gate h3 {
	font-family: var(--secx-font-display);
	font-size: 24px;
	margin: 0 0 10px;
}
.secx-diag__gate p {
	color: var(--secx-muted);
	line-height: 1.6;
	margin: 0 0 24px;
}
.secx-diag__gate label {
	display: block;
	margin-bottom: 16px;
}
.secx-diag__gate label span {
	display: block;
	font-family: var(--secx-font-mono);
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--secx-muted);
	margin-bottom: 6px;
}
.secx-diag__gate input {
	width: 100%;
	background: var(--secx-panel);
	border: 1px solid var(--secx-line);
	border-radius: 3px;
	padding: 12px 14px;
	color: var(--secx-paper);
	font-family: var(--secx-font-body);
	font-size: 15px;
}
.secx-diag__gate input:focus-visible {
	outline: 2px solid var(--secx-accent);
	outline-offset: 1px;
}
.secx-diag__btn--submit {
	margin-top: 8px;
}
.secx-diag__hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	opacity: 0;
}
.secx-diag__error {
	color: var(--secx-red);
	font-size: 14px;
	margin-top: 14px;
}

/* ---------- Result screen ---------- */

.secx-diag__result {
	text-align: center;
}

.secx-diag__gauge {
	position: relative;
	max-width: 280px;
	margin: 0 auto 8px;
}
.secx-diag__gauge-svg {
	width: 100%;
	display: block;
}
.secx-diag__gauge-track,
.secx-diag__gauge-fill {
	fill: none;
	stroke-width: 12;
	stroke-linecap: round;
}
.secx-diag__gauge-track {
	stroke: var(--secx-line);
}
.secx-diag__gauge-fill {
	stroke: var(--secx-accent);
	stroke-dasharray: 282.74; /* semicircle length, r=90 => pi*r */
	stroke-dashoffset: 282.74;
	transition: stroke-dashoffset 1.1s cubic-bezier(0.22, 1, 0.36, 1), stroke 0.4s ease;
}

.secx-diag__gauge-score {
	position: absolute;
	left: 50%;
	bottom: 6px;
	transform: translateX(-50%);
	font-family: var(--secx-font-mono);
}
.secx-diag__gauge-number {
	font-size: 44px;
	font-weight: 600;
}
.secx-diag__gauge-percent {
	font-size: 20px;
	color: var(--secx-muted);
}

.secx-diag__band-label {
	font-family: var(--secx-font-display);
	font-size: 22px;
	font-weight: 700;
	margin: 4px 0 24px;
}

.secx-diag__recommendations {
	text-align: left;
	margin-bottom: 20px;
}
.secx-diag__reco-list {
	list-style: none;
	margin: 0;
	padding: 0;
	border-top: 1px solid var(--secx-line);
}
.secx-diag__reco-list li {
	padding: 14px 0;
	border-bottom: 1px solid var(--secx-line);
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.secx-diag__reco-pain {
	font-size: 15px;
	color: var(--secx-paper);
}
.secx-diag__reco-service {
	font-family: var(--secx-font-mono);
	font-size: 12px;
	color: var(--secx-accent);
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.secx-diag__result-note {
	font-size: 13px;
	color: var(--secx-muted);
}

/* ---------- Responsive ---------- */

@media (max-width: 520px) {
	.secx-diag__panel {
		padding: 32px 22px;
	}
	.secx-diag__answers {
		flex-direction: column;
	}
	.secx-diag__btn--answer {
		width: 100%;
	}
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
	.secx-diag__gauge-fill,
	.secx-diag__btn {
		transition: none !important;
	}
}
