.amortization-page {
	--amo-ink: #162033;
	--amo-blue: #1f5f98;
	--amo-teal: #138174;
	--amo-amber: #bb7d19;
	--amo-red: #b65a45;
	--amo-soft: #eef7f5;
}

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

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

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

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

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

.amort-hero-panel span,
.result-top span,
.metric-grid span,
.formula-box span,
.schedule-legend span {
	font-size: 12px;
	font-weight: 800;
	text-transform: uppercase;
}

.amort-hero-panel span,
.formula-box span {
	color: var(--amo-teal);
}

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

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

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

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

.amort-inputs,
.amort-results,
.schedule-board {
	padding: 22px;
}

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

.extra-block {
	background:
		linear-gradient(180deg, #ffffff 0%, #f7fbf7 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(--amo-teal);
	outline: none;
	box-shadow: 0 0 0 3px rgba(19, 129, 116, 0.16);
}

.scenario-row {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 16px;
}

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

.scenario-row button {
	color: var(--amo-teal);
	background: var(--amo-soft);
	border: 1px solid #b8ddd7;
}

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

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

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

.result-top span {
	color: #94dcca;
}

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

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

.donut {
	--principal: 66%;
	width: 120px;
	aspect-ratio: 1;
	border-radius: 50%;
	background:
		conic-gradient(var(--amo-teal) 0 var(--principal), var(--amo-amber) var(--principal) 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(--amo-ink);
	font-size: 18px;
}

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

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

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

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

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

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

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

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

.schedule-legend span:nth-child(2) i {
	background: var(--amo-amber);
}

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

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

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

.payoff-chart em {
	background: var(--amo-amber);
}

.payoff-chart i {
	background: var(--amo-teal);
}

.payoff-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(--amo-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(--amo-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(--amo-ink);
	font-weight: 800;
}

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

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

	.amort-results {
		position: static;
	}
}

@media (max-width: 640px) {
	.amort-hero,
	.amort-inputs,
	.amort-results,
	.schedule-board,
	.content-section,
	.disclaimer {
		padding: 18px;
	}

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

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

	.donut {
		width: 110px;
	}

	.schedule-heading {
		display: grid;
	}
}
