.retirement-page {
	--ret-ink: #172033;
	--ret-green: #166a5f;
	--ret-blue: #2456a6;
	--ret-coral: #c75f4a;
	--ret-gold: #b8861f;
	--ret-mint: #e8f5f1;
}

.retire-hero {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 22px;
	align-items: stretch;
	margin-bottom: 22px;
	padding: 30px;
	color: #ffffff;
	background:
		linear-gradient(135deg, #172033 0%, #1f514c 54%, #386d8a 100%);
	border: 1px solid #294557;
	border-radius: 8px;
	box-shadow: var(--shadow);
}

.retire-hero h1 {
	color: #ffffff;
}

.retire-hero p {
	max-width: 760px;
	color: #dce8ee;
}

.retire-hero .eyebrow {
	color: #f8c76f;
}

.retire-hero-card {
	display: grid;
	align-content: center;
	gap: 8px;
	padding: 18px;
	color: var(--ret-ink);
	background: #ffffff;
	border-radius: 8px;
}

.retire-hero-card span,
.mode-tabs span,
.primary-result span,
.metric-grid span,
.formula-box span,
.timeline-legend span,
.result-flag {
	font-size: 12px;
	font-weight: 800;
	text-transform: uppercase;
}

.retire-hero-card span,
.formula-box span {
	color: var(--ret-green);
}

.retire-hero-card strong {
	color: var(--ret-ink);
	font-size: 25px;
	line-height: 1.12;
}

.retire-hero-card p {
	margin: 0;
	color: var(--muted);
	font-size: 14px;
}

.retire-tool {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(360px, 0.86fr);
	gap: 20px;
	align-items: start;
}

.retire-input-card,
.retire-output-card,
.retire-timeline-card,
.content-section,
.disclaimer {
	background: #ffffff;
	border: 1px solid var(--line);
	border-radius: 8px;
	box-shadow: var(--shadow-soft);
}

.retire-input-card,
.retire-output-card,
.retire-timeline-card {
	padding: 22px;
}

.mode-tabs {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 8px;
	margin-bottom: 18px;
}

.mode-tabs label {
	cursor: pointer;
}

.mode-tabs input {
	position: absolute;
	opacity: 0;
}

.mode-tabs span {
	display: flex;
	min-height: 48px;
	align-items: center;
	justify-content: center;
	padding: 9px;
	color: #526276;
	background: #f7f9fc;
	border: 1px solid #d5e0ea;
	border-radius: 8px;
	text-align: center;
}

.mode-tabs input:checked + span {
	color: #ffffff;
	background: var(--ret-green);
	border-color: var(--ret-green);
}

.input-group {
	padding: 16px;
	background: #f8fbfc;
	border: 1px solid #dce7ef;
	border-radius: 8px;
}

.input-group + .input-group {
	margin-top: 14px;
}

.input-group h2 {
	margin-bottom: 12px;
	font-size: 18px;
}

.field-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

.field {
	display: grid;
	gap: 7px;
	color: #344052;
	font-size: 14px;
	font-weight: 800;
}

.field input {
	width: 100%;
	min-height: 44px;
	padding: 10px 11px;
	color: var(--text);
	background: #ffffff;
	border: 1px solid #c5d1e1;
	border-radius: 7px;
	font: inherit;
}

.field input:focus {
	border-color: var(--ret-green);
	outline: none;
	box-shadow: 0 0 0 3px rgba(22, 106, 95, 0.16);
}

.field em {
	color: var(--muted);
	font-size: 12px;
	font-style: normal;
	font-weight: 700;
}

.field.is-hidden {
	display: none;
}

.example-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 16px;
}

.example-actions button,
.copy-button {
	min-height: 42px;
	padding: 10px 14px;
	cursor: pointer;
	border-radius: 7px;
	font: inherit;
	font-weight: 800;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.example-actions button {
	color: var(--ret-green);
	background: var(--ret-mint);
	border: 1px solid #b9ddd3;
}

.example-actions button:hover,
.copy-button:hover {
	transform: translateY(-1px);
	box-shadow: var(--shadow-soft);
}

.input-note {
	margin: 12px 0 0;
	color: var(--muted);
	font-size: 14px;
}

.retire-output-card {
	position: sticky;
	top: 86px;
	display: grid;
	gap: 14px;
	background:
		linear-gradient(180deg, #ffffff 0%, #f6fbfa 100%);
}

.result-flag {
	display: inline-flex;
	width: fit-content;
	padding: 7px 10px;
	color: #ffffff;
	background: var(--ret-green);
	border-radius: 999px;
}

.result-flag.is-warning {
	background: var(--ret-coral);
}

.result-flag.is-neutral {
	background: var(--ret-blue);
}

.primary-result {
	padding: 18px;
	color: #ffffff;
	background: var(--ret-ink);
	border-radius: 8px;
}

.primary-result span {
	color: #9ee4d4;
}

.primary-result strong {
	display: block;
	margin-top: 8px;
	font-size: 40px;
	line-height: 1.1;
	overflow-wrap: anywhere;
}

.primary-result p {
	margin: 10px 0 0;
	color: #dce8ee;
}

.metric-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}

.metric-grid div,
.formula-box {
	padding: 13px;
	background: #ffffff;
	border: 1px solid #dce7ef;
	border-radius: 8px;
}

.metric-grid span {
	color: var(--muted);
}

.metric-grid strong {
	display: block;
	margin-top: 5px;
	color: var(--ret-ink);
	font-size: 18px;
}

.formula-box p {
	margin: 0;
	color: #435166;
}

.copy-button {
	color: #ffffff;
	background: var(--ret-green);
	border: 1px solid var(--ret-green);
}

.retire-timeline-card {
	grid-column: 1 / -1;
}

.timeline-heading {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	align-items: start;
	margin-bottom: 16px;
}

.timeline-heading p {
	margin: 8px 0 0;
	color: var(--muted);
}

.timeline-legend {
	display: grid;
	gap: 6px;
	color: #435166;
}

.timeline-legend i {
	display: inline-block;
	width: 14px;
	height: 8px;
	margin-right: 6px;
	background: var(--ret-green);
	border-radius: 999px;
}

.timeline-legend span:nth-child(2) i {
	background: var(--ret-gold);
}

.retire-bars {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
	min-height: 190px;
	align-items: end;
	padding: 18px;
	background: #f6f9fc;
	border: 1px solid #dce7ef;
	border-radius: 8px;
}

.retire-bar {
	display: grid;
	grid-template-rows: 1fr auto;
	gap: 8px;
	min-width: 0;
	height: 154px;
	align-items: end;
}

.retire-bar-track {
	display: flex;
	align-items: end;
	justify-content: center;
	gap: 4px;
	height: 128px;
}

.retire-bar-track i,
.retire-bar-track b {
	display: block;
	width: 18px;
	min-height: 3px;
	border-radius: 7px 7px 0 0;
}

.retire-bar-track i {
	background: var(--ret-green);
}

.retire-bar-track b {
	background: var(--ret-gold);
}

.retire-bar strong {
	color: #344052;
	font-size: 12px;
	text-align: center;
}

.table-wrap {
	margin-top: 14px;
	overflow-x: auto;
	border: 1px solid #dce7ef;
	border-radius: 8px;
}

.table-wrap table {
	width: 100%;
	min-width: 720px;
	border-collapse: collapse;
}

.table-wrap th,
.table-wrap td {
	padding: 12px;
	border-bottom: 1px solid #dce7ef;
	text-align: left;
}

.table-wrap th {
	color: var(--ret-ink);
	background: #f6f9fc;
	font-size: 13px;
}

.table-wrap td {
	color: #344052;
}

.content-section,
.disclaimer {
	margin-top: 22px;
	padding: 24px;
}

.content-section p,
.content-section li {
	color: #435166;
}

.guide-grid,
.example-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
}

.guide-grid article,
.example-grid article {
	padding: 16px;
	background: #f8fbfc;
	border: 1px solid #dce7ef;
	border-radius: 8px;
}

.guide-grid p,
.example-grid p {
	margin-bottom: 0;
}

.method-section {
	background:
		linear-gradient(180deg, #ffffff 0%, #f8fbfa 100%);
}

.formula-large {
	margin: 16px 0;
	padding: 16px;
	color: var(--ret-ink);
	background: #edf5f2;
	border: 1px solid #c9e0d8;
	border-radius: 8px;
	font-weight: 800;
}

.faq-section details {
	padding: 14px 0;
	border-top: 1px solid var(--line);
}

.faq-section summary {
	cursor: pointer;
	color: var(--ret-ink);
	font-weight: 800;
}

.disclaimer {
	color: #56647a;
	background: #fffaf0;
	border-color: #ead9b8;
}

@media (max-width: 920px) {
	.retire-hero,
	.retire-tool {
		grid-template-columns: 1fr;
	}

	.retire-output-card {
		position: static;
	}

	.mode-tabs {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.retire-hero,
	.retire-input-card,
	.retire-output-card,
	.retire-timeline-card,
	.content-section,
	.disclaimer {
		padding: 18px;
	}

	.field-grid,
	.metric-grid,
	.guide-grid,
	.example-grid,
	.retire-bars {
		grid-template-columns: 1fr;
	}

	.mode-tabs {
		grid-template-columns: 1fr;
	}

	.primary-result strong {
		font-size: 32px;
	}

	.timeline-heading {
		display: grid;
	}
}
