.investment-page {
	--inv-ink: #172033;
	--inv-blue: #2458a6;
	--inv-green: #16836f;
	--inv-plum: #7051a6;
	--inv-gold: #bf8421;
	--inv-soft: #edf6f3;
	overflow-x: clip;
}

.invest-hero {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(280px, 330px);
	gap: 22px;
	align-items: stretch;
	margin-bottom: 22px;
	padding: 30px;
	color: #ffffff;
	background:
		linear-gradient(135deg, #172033 0%, #24445f 48%, #16836f 100%);
	border: 1px solid #29465b;
	border-radius: 8px;
	box-shadow: var(--shadow);
}

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

.invest-hero p {
	max-width: 780px;
	color: #dbe8ee;
}

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

.invest-hero-panel {
	display: grid;
	min-width: 0;
	align-content: center;
	gap: 8px;
	padding: 18px;
	color: var(--inv-ink);
	background: #ffffff;
	border-radius: 8px;
}

.invest-hero-panel span,
.mode-tabs span,
.result-main span,
.metric-grid span,
.formula-box span,
.growth-legend span {
	font-size: 12px;
	font-weight: 800;
	text-transform: uppercase;
}

.invest-hero-panel span,
.formula-box span {
	color: var(--inv-green);
}

.invest-hero-panel strong {
	color: var(--inv-ink);
	font-size: 25px;
	line-height: 1.12;
}

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

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

.investment-controls,
.investment-results,
.growth-board,
.content-section,
.disclaimer {
	background: #ffffff;
	border: 1px solid var(--line);
	border-radius: 8px;
	box-shadow: var(--shadow-soft);
}

.investment-controls,
.investment-results,
.growth-board {
	min-width: 0;
	padding: 22px;
}

.mode-tabs {
	display: grid;
	grid-template-columns: repeat(5, 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(--inv-green);
	border-color: var(--inv-green);
}

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

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

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

.assumption-block {
	background:
		linear-gradient(180deg, #ffffff 0%, #f8fbf7 100%);
}

.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,
.field select {
	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,
.field select:focus {
	border-color: var(--inv-green);
	outline: none;
	box-shadow: 0 0 0 3px rgba(22, 131, 111, 0.16);
}

.field.is-muted {
	opacity: 0.55;
}

.field.is-muted input {
	background: #f3f6fa;
}

.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(--inv-green);
	background: var(--inv-soft);
	border: 1px solid #b8ddd7;
}

.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;
}

.investment-results {
	display: grid;
	gap: 14px;
	background:
		linear-gradient(180deg, #ffffff 0%, #f6fbfc 100%);
}

.result-main {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 130px;
	gap: 16px;
	align-items: center;
	padding: 18px;
	color: #ffffff;
	background: var(--inv-ink);
	border-radius: 8px;
}

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

.result-main strong {
	display: block;
	margin-top: 8px;
	font-size: clamp(30px, 4vw, 38px);
	line-height: 1.1;
	overflow-wrap: anywhere;
}

.result-main p {
	margin: 10px 0 0;
	color: #dbe8ee;
}

.allocation-ring {
	--start: 12%;
	--contrib: 70%;
	width: 120px;
	aspect-ratio: 1;
	border-radius: 50%;
	background:
		conic-gradient(var(--inv-blue) 0 var(--start), var(--inv-green) var(--start) var(--contrib), var(--inv-gold) var(--contrib) 100%);
	box-shadow: inset 0 0 0 20px #ffffff;
}

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

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

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

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

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

.warning-box {
	color: #713411;
	background: #fff7ed;
	border-color: #f1d3ac;
}

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

.growth-board {
	grid-column: 1 / -1;
}

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

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

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

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

.growth-legend span:nth-child(2) i {
	background: var(--inv-green);
}

.growth-legend span:nth-child(3) i {
	background: var(--inv-gold);
}

.growth-chart {
	display: grid;
	grid-template-columns: repeat(10, minmax(22px, 1fr));
	gap: 8px;
	min-height: 210px;
	align-items: end;
	padding: 18px;
	background: #f6f9fc;
	border: 1px solid #dce7ef;
	border-radius: 8px;
	overflow-x: auto;
}

.growth-chart div {
	display: grid;
	grid-template-rows: 1fr auto;
	gap: 7px;
	min-width: 28px;
	height: 168px;
	align-items: end;
}

.growth-chart span,
.growth-chart em,
.growth-chart b {
	display: block;
	width: 100%;
	min-height: 2px;
	border-radius: 7px 7px 0 0;
}

.growth-chart span {
	background: var(--inv-blue);
}

.growth-chart em {
	background: var(--inv-green);
}

.growth-chart b {
	background: var(--inv-gold);
}

.growth-chart strong {
	color: #344052;
	font-size: 11px;
	text-align: center;
}

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

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

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

.table-wrap th {
	position: sticky;
	top: 0;
	z-index: 1;
	color: var(--inv-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(--inv-ink);
	background: #edf5f2;
	border: 1px solid #c9e0d8;
	border-radius: 8px;
	font-weight: 800;
}

.source-note {
	margin-top: 18px;
	padding: 18px;
	background: #f6f9fc;
	border: 1px solid #dce7ef;
	border-left: 6px solid var(--inv-blue);
	border-radius: 8px;
}

.source-note h3 {
	margin-bottom: 8px;
}

.source-note a {
	color: var(--inv-blue);
	font-weight: 800;
}

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

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

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

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

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

@media (max-width: 640px) {
	.invest-hero,
	.investment-controls,
	.investment-results,
	.growth-board,
	.content-section,
	.disclaimer {
		padding: 18px;
	}

	.mode-tabs,
	.field-grid,
	.metric-grid,
	.guide-grid,
	.example-grid,
	.result-main {
		grid-template-columns: 1fr;
	}

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

	.allocation-ring {
		width: 110px;
	}

	.growth-heading {
		display: grid;
	}
}
