#npc {
	--brand: #592d82;
	--brand-dark: #005cb9;
	--brand-rgb: 89, 44, 130;
	--brand-tint: rgba(var(--brand-rgb), 0.08);
	--text-primary: #212529;
	--text-secondary: #4b5563;
	--text-muted: #6b7280;
	--bg: #f8f6fa;
	--surface: #ffffff;
	--border: #e5e7eb;
	--border-strong: #d1d5db;
	--error: #b91c1c;
	--radius: 8px;
	--radius-lg: 12px;
	--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
	color: var(--text-primary);
}

#npc .header {
	margin-bottom: 20px;
}

#npc .header .eyebrow {
	display: block;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--brand);
	margin-bottom: 8px;
}

#npc h1 {
	margin: 0;
	font-size: clamp(24px, 4vw, 32px);
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.1;
}

#npc h2 {
	margin: 0 0 4px;
	font-size: 20px;
	font-weight: 700;
	letter-spacing: -0.01em;
	color: var(--text-primary);
}

#npc .header .meta {
	margin: 10px 0 0;
	color: var(--text-secondary);
	font-size: 15px;
}

/* ---------- stepper ---------- */
#npc .stepper {
	margin: 0 0 20px;
}

#npc .stepper ol {
	display: flex;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 0;
	counter-reset: step;
	flex-wrap: wrap;
}

#npc .stepper .step {
	flex: 1 1 0;
	min-width: 110px;
	display: flex;
	align-items: center;
	gap: 10px;
	position: relative;
	padding: 0 8px 0 0;
	color: var(--text-muted);
	font-size: 13px;
	font-weight: 500;
	background: transparent;
	border: 0;
	text-align: left;
	cursor: default;
}

#npc .stepper button.step {
	cursor: pointer;
	font-family: inherit;
}

#npc .stepper button.step:focus-visible {
	outline: 2px solid var(--brand);
	outline-offset: 4px;
	border-radius: var(--radius);
}

#npc .stepper .step-num {
	flex: 0 0 auto;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--surface);
	border: 1.5px solid var(--border-strong);
	color: var(--text-muted);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 13px;
	transition: background 120ms, border-color 120ms, color 120ms;
}

#npc .stepper .step-label {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

#npc .stepper .step.is-active .step-num {
	background: var(--brand);
	border-color: var(--brand);
	color: #ffffff;
}

#npc .stepper .step.is-active {
	color: var(--text-primary);
	font-weight: 600;
}

#npc .stepper .step.is-complete .step-num {
	background: var(--brand-tint);
	border-color: var(--brand);
	color: var(--brand);
}

#npc .stepper .step.is-complete .step-num::before {
	content: "\2713";
	font-size: 14px;
}

#npc .stepper .step.is-complete .step-num span {
	display: none;
}

/* ---------- card / screens ---------- */
.card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	padding: clamp(20px, 3vw, 28px);
	box-shadow: var(--shadow-sm);
}

#npc .screen[hidden] {
	display: none !important;
}

#npc .screen-header {
	margin-bottom: 18px;
}

#npc .screen-header p {
	margin: 6px 0 0;
	color: var(--text-secondary);
	font-size: 14px;
}

#npc form#calc {
	display: contents;
}

#npc .fields {
	display: grid;
	gap: 16px;
}

#npc label.field {
	display: grid;
	gap: 6px;
}

#npc label.field .label-text {
	font-size: 14px;
	font-weight: 600;
	color: var(--text-primary);
}

#npc select,
#npc input {
	width: 100%;
	height: 44px;
	padding: 0 12px;
	font-size: 15px;
	font-family: inherit;
	color: var(--text-primary);
	background: var(--surface);
	border: 1px solid var(--border-strong);
	border-radius: var(--radius);
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	transition: border-color 120ms, box-shadow 120ms;
}

#npc select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%234b5563' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	background-size: 12px;
	padding-right: 36px;
	cursor: pointer;
}

#npc select:focus,
#npc input:focus {
	outline: none;
	border-color: var(--brand);
	box-shadow: 0 0 0 3px rgba(var(--brand-rgb), 0.18);
}

#npc .field-hidden {
	display: none !important;
}

#npc .field.has-error select,
#npc .field.has-error input {
	border-color: var(--error);
	box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.15);
}

#npc .field-error {
	color: var(--error);
	font-size: 13px;
	font-weight: 500;
}

/* ---------- nav buttons ---------- */
#npc .nav-row {
	display: flex;
	gap: 12px;
	margin-top: 24px;
	padding-top: 18px;
	border-top: 1px solid var(--border);
	flex-wrap: wrap;
}

#npc .nav-row .spacer {
	flex: 1;
}

#npc .btn {
	height: 44px;
	padding: 0 22px;
	font-size: 15px;
	font-weight: 600;
	font-family: inherit;
	border-radius: var(--radius);
	cursor: pointer;
	transition: background 120ms, transform 80ms, border-color 120ms;
	border: 1px solid transparent;
}

#npc .btn:focus-visible {
	outline: 2px solid var(--brand);
	outline-offset: 2px;
}

#npc .btn:active {
	transform: translateY(1px);
}

#npc .btn-primary {
	color: #ffffff;
	background: var(--brand);
	border-color: var(--brand);
}

#npc .btn-primary:hover {
	background: var(--brand-dark);
	border-color: var(--brand-dark);
}

#npc .btn-secondary {
	color: var(--text-primary);
	background: var(--surface);
	border-color: var(--border-strong);
}

#npc .btn-secondary:hover {
	border-color: var(--text-secondary);
}

/* ---------- agreement ---------- */
#npc .agreement-text {
	display: grid;
	gap: 14px;
	color: var(--text-secondary);
	font-size: 14px;
	line-height: 1.7;
}

#npc .agreement-text p {
	margin: 0;
}

#npc .agreement-text strong {
	color: var(--text-primary);
	font-weight: 600;
}

#npc .agreement-text a {
	color: var(--brand);
}

/* ---------- result ---------- */
#npc .result-headline {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding-bottom: 18px;
	border-bottom: 1px solid var(--border);
}

#npc .result-headline .label {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--brand);
}

#npc .result-net {
	font-size: clamp(36px, 7vw, 48px);
	font-weight: 700;
	letter-spacing: -0.025em;
	color: var(--brand);
	line-height: 1.05;
	font-variant-numeric: tabular-nums;
}

#npc .result-program {
	margin-top: 8px;
	font-size: 13px;
	color: var(--text-secondary);
}

#npc .result-program[hidden] {
	display: none;
}

#npc .result-program strong {
	color: var(--text-primary);
	font-weight: 700;
}

#npc .result-breakdown {
	margin-top: 18px;
	display: grid;
	gap: 10px;
}

#npc .result-row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	font-size: 14px;
	gap: 16px;
}

#npc .result-row .row-label {
	color: var(--text-secondary);
}

#npc .result-row .row-value {
	font-variant-numeric: tabular-nums;
	font-weight: 500;
	color: var(--text-primary);
	text-align: right;
	white-space: nowrap;
}

#npc .result-row-sub {
	padding-left: 14px;
}

#npc .result-row-sub .row-label {
	font-size: 13px;
}

#npc .result-row-total .row-label,
#npc .result-row-grant .row-label {
	color: var(--text-primary);
}

#npc .result-row-total .row-value,
#npc .result-row-grant .row-value {
	font-weight: 700;
}

#npc .result-row-grant {
	margin-top: 6px;
	padding-top: 10px;
	border-top: 1px solid var(--border);
}

#npc .result-row-sai {
	margin-top: 4px;
	padding-top: 10px;
	border-top: 1px dashed var(--border);
	font-size: 13px;
}

#npc .row-desc {
	display: block;
	font-size: 12px;
	color: var(--text-secondary);
	margin-top: 2px;
}

#npc .result-row .op {
	color: var(--text-secondary);
	margin-left: 4px;
}

#npc .footnote {
	margin-top: 28px;
	padding-top: 22px;
	border-top: 1px solid var(--border);
	color: var(--text-muted);
	font-size: 13px;
	line-height: 1.65;
}

#npc .footnote p {
	margin: 0 0 14px;
}

#npc .footnote p:last-child {
	margin: 0;
}

#npc .footnote a {
	color: var(--text-secondary);
	text-decoration: underline;
}

#npc .footnote a:hover {
	color: var(--brand);
}

#npc .footnote strong {
	color: var(--text-secondary);
	font-weight: 600;
}

@media (max-width: 540px) {
	#npc .stepper .step-label {
		display: none;
	}

	#npc .stepper .step {
		min-width: 0;
		justify-content: center;
	}

	#npc .nav-row .btn {
		flex: 1;
	}
}

@media print {
#npc {
		background: #ffffff;
	}

#npc {
		background: #ffffff;
	}

	#npc .card {
		box-shadow: none;
	}

	#npc .stepper,
	#npc .nav-row {
		display: none !important;
	}

	#npc .screen[hidden] {
		display: none !important;
	}

	#npc .dep-overlay {
		display: none !important;
	}
}

/* --- Dependency-status questionnaire (shared partial) --- */
#npc .dep-help-line {
	margin: 6px 0 0;
	font-size: 14px;
	color: var(--text-muted);
}

#npc .dep-help-link {
	background: none;
	border: none;
	padding: 0;
	font: inherit;
	cursor: pointer;
	color: var(--brand);
	font-weight: 600;
	text-decoration: underline;
}

#npc .dep-help-link:hover {
	filter: brightness(0.9);
}

#npc .dep-overlay {
	position: fixed;
	inset: 0;
	z-index: 1000;
	background: rgba(15, 23, 42, 0.55);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

#npc .dep-overlay[hidden] {
	display: none;
}

#npc .dep-dialog {
	background: var(--surface);
	border-radius: var(--radius);
	width: 100%;
	max-width: 600px;
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

#npc .dep-dialog-head {
	padding: 20px 24px 12px;
	border-bottom: 1px solid var(--border);
}

#npc .dep-dialog-head h2 {
	margin: 0 0 4px;
	font-size: 19px;
}

#npc .dep-dialog-head p {
	margin: 0;
	font-size: 14px;
	color: var(--text-secondary);
}

#npc .dep-dialog-body {
	padding: 8px 24px;
	overflow-y: auto;
}

#npc .dep-q {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 12px 0;
	border-bottom: 1px solid var(--border);
	cursor: pointer;
}

#npc .dep-q:last-child {
	border-bottom: none;
}

#npc .dep-q input[type="checkbox"] {
	width: 20px;
	height: 20px;
	flex: 0 0 auto;
	margin: 1px 0 0;
	padding: 0;
	-webkit-appearance: auto;
	-moz-appearance: auto;
	appearance: auto;
	accent-color: var(--brand);
	cursor: pointer;
}

#npc .dep-q-text {
	font-size: 15px;
}

#npc .dep-dialog-foot {
	padding: 14px 24px 20px;
	border-top: 1px solid var(--border);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
}

#npc .dep-result {
	flex: 1 1 100%;
	font-size: 15px;
	font-weight: 600;
	margin: 0;
	padding: 10px 12px;
	border-radius: var(--radius);
	background: rgba(var(--brand-rgb), 0.1);
}

#npc .dep-result[hidden] {
	display: none;
}

#npc .dep-foot-spacer {
	flex: 1;
}

@media print {
	#npc .dep-overlay {
		display: none !important;
	}
}