.ns-population-calculator-page {
	--pop-ink: #132c3d;
	--pop-navy: #15334a;
	--pop-navy-dark: #0d2638;
	--pop-coral: #e06c55;
	--pop-coral-soft: #f7d8cf;
	--pop-teal: #0d776c;
	--pop-teal-soft: #dff1ed;
	--pop-gold: #e3ab4d;
	--pop-paper: #fff;
	--pop-wash: #f4f7f6;
	--pop-line: #d9e2e0;
	--pop-muted: #60716f;
	background: var(--pop-wash);
	color: var(--pop-ink);
}

.ns-population-calculator-page .site-content {
	background:
		linear-gradient(90deg, rgba(19, 44, 61, .03) 1px, transparent 1px) 0 0 / 44px 44px,
		var(--pop-wash);
}

.ns-population-calculator-page .content-wrapper { display: block; max-width: none; }

.ns-population-calculator-page .ns-pop {
	width: 100%;
	min-width: 0;
	padding: 0;
	background: transparent;
	font-family: var(--wikipress-font-ui);
}

.ns-pop__shell {
	width: min(1180px, calc(100% - 48px));
	margin: 0 auto;
	padding: 22px 0 88px;
}

.ns-pop-breadcrumbs {
	display: flex;
	align-items: center;
	gap: 9px;
	margin: 0 0 22px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .04em;
	color: #73837f;
}

.ns-pop-breadcrumbs a { color: #536b65; }

.ns-pop-hero {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1.3fr) minmax(290px, .7fr);
	align-items: center;
	min-height: 390px;
	overflow: hidden;
	padding: 58px 68px 67px;
	border-radius: 4px;
	background:
		radial-gradient(circle at 84% 18%, rgba(224, 108, 85, .18), transparent 28%),
		linear-gradient(125deg, var(--pop-navy-dark), var(--pop-navy));
	box-shadow: 0 18px 42px rgba(13, 38, 56, .16);
	color: #fff;
}

.ns-pop-hero::before,
.ns-pop-hero::after {
	position: absolute;
	border: 1px solid rgba(255, 255, 255, .09);
	border-radius: 50%;
	content: '';
}

.ns-pop-hero::before { width: 340px; height: 340px; right: -80px; top: -190px; }
.ns-pop-hero::after { width: 220px; height: 220px; right: 80px; bottom: -160px; }
.ns-pop-hero__copy { position: relative; z-index: 1; max-width: 760px; }

.ns-pop-eyebrow,
.ns-pop-label {
	margin: 0 0 14px;
	font-size: 11px;
	font-weight: 900;
	line-height: 1.2;
	letter-spacing: .16em;
	text-transform: uppercase;
}

.ns-pop-eyebrow { display: flex; align-items: center; gap: 10px; color: #f0a997; }
.ns-pop-eyebrow span { width: 28px; height: 1px; background: currentColor; }
.ns-pop-label { color: var(--pop-teal); }

.ns-pop-hero h1 {
	margin: 0;
	padding: 0;
	border: 0;
	font-family: Georgia, 'Times New Roman', serif;
	font-size: clamp(46px, 5.8vw, 73px);
	font-weight: 400;
	line-height: .98;
	letter-spacing: -.048em;
	color: #fff;
}

.ns-pop-hero h1 em { color: #f0a997; font-weight: 400; }

.ns-pop-hero__copy > p:last-child {
	max-width: 710px;
	margin: 25px 0 0;
	font-size: 16px;
	line-height: 1.7;
	color: rgba(255, 255, 255, .8);
}

.ns-pop-hero__visual { position: relative; z-index: 1; }
.ns-pop-hero__visual svg { width: 100%; max-width: 320px; overflow: visible; }
.ns-pop-hero__visual path:first-child { stroke: #f1ae9d; stroke-width: 4; stroke-linecap: round; }
.ns-pop-hero__visual path:nth-child(2) { stroke: #f1ae9d; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.ns-pop-hero__visual circle { fill: var(--pop-navy); stroke: #f1ae9d; stroke-width: 3; }

.ns-pop-hero__dot { position: absolute; display: block; border-radius: 50%; background: rgba(224, 108, 85, .25); }
.ns-pop-hero__dot--one { width: 42px; height: 42px; right: 18px; top: 22px; }
.ns-pop-hero__dot--two { width: 18px; height: 18px; left: 80px; bottom: 14px; }

.ns-pop-calculator {
	position: relative;
	z-index: 3;
	margin: -18px 24px 0;
	padding: 28px 34px 31px;
	border: 1px solid var(--pop-line);
	border-radius: 4px;
	background: #fff;
	box-shadow: 0 16px 36px rgba(18, 49, 43, .09);
}

.ns-pop-calculator__heading,
.ns-pop-section-heading {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
}

.ns-pop-calculator h2,
.ns-pop-section-heading h2,
.ns-pop-result-summary h2,
.ns-pop-formulas h2,
.ns-pop-guide h2,
.ns-pop-next-tools h2 {
	margin: 0;
	font-family: Georgia, 'Times New Roman', serif;
	font-weight: 400;
	letter-spacing: -.025em;
	color: var(--pop-ink);
}

.ns-pop-calculator h2 { font-size: 28px; }
.ns-pop-calculator__heading > p,
.ns-pop-section-heading > p { margin: 0 0 3px; font-size: 12px; color: var(--pop-muted); }

.ns-pop-fields {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr) .65fr;
	align-items: start;
	gap: 16px;
	margin-top: 24px;
}

.ns-pop-field { display: grid; gap: 8px; }
.ns-pop-field > span { font-size: 11px; font-weight: 900; letter-spacing: .04em; color: #425c56; }
.ns-pop-field > div { position: relative; }

.ns-pop-field input {
	width: 100%;
	height: 57px;
	padding: 0 76px 0 16px;
	border: 1px solid #b7c8c5;
	border-radius: 3px;
	background: #fff;
	font: 700 18px/1 Georgia, 'Times New Roman', serif;
	color: var(--pop-ink);
}

.ns-pop-field--years input { padding-right: 62px; }
.ns-pop-field input:hover { border-color: var(--pop-teal); }
.ns-pop-field input:focus,
.ns-pop-button:focus,
.ns-pop-swap:focus,
.ns-pop-presets button:focus,
.ns-pop-icon-button:focus { outline: 3px solid rgba(13, 119, 108, .2); outline-offset: 2px; }

.ns-pop-field > div small {
	position: absolute;
	right: 13px;
	top: 50%;
	font-size: 10px;
	font-weight: 800;
	color: #71827f;
	transform: translateY(-50%);
	pointer-events: none;
}

.ns-pop-field > em { font-size: 9px; font-style: normal; color: #80908d; }

.ns-pop-swap {
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	margin-top: 28px;
	padding: 0;
	border: 1px solid var(--pop-line);
	border-radius: 50%;
	background: #edf4f2;
	color: var(--pop-teal);
	cursor: pointer;
	transition: transform .2s ease, background .2s ease;
}

.ns-pop-swap:hover { transform: rotate(180deg); background: var(--pop-teal-soft); }
.ns-pop-swap svg,
.ns-pop-icon-button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.ns-pop-form-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	margin-top: 24px;
	padding-top: 19px;
	border-top: 1px solid #e8eeec;
}

.ns-pop-presets { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.ns-pop-presets > span { margin-right: 3px; font-size: 10px; font-weight: 800; color: var(--pop-muted); }
.ns-pop-presets button { padding: 5px 9px; border: 1px solid #d6e0dd; border-radius: 20px; background: #fff; font: 700 9px/1.2 var(--wikipress-font-ui); color: #526964; cursor: pointer; }
.ns-pop-presets button:hover { border-color: var(--pop-teal); color: var(--pop-teal); }
.ns-pop-form-actions { display: flex; gap: 8px; flex: 0 0 auto; }

.ns-pop-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 43px;
	padding: 0 17px;
	border: 1px solid var(--pop-teal);
	border-radius: 3px;
	background: var(--pop-teal);
	font: 800 11px/1 var(--wikipress-font-ui);
	color: #fff;
	cursor: pointer;
}

.ns-pop-button:hover { background: #095e56; }
.ns-pop-button--ghost { background: #fff; color: var(--pop-teal); }
.ns-pop-button--ghost:hover { background: var(--pop-teal-soft); }
.ns-pop-error { margin: 17px 0 0; padding: 10px 12px; border-left: 3px solid #b64b3a; background: #fff1ee; font-size: 12px; color: #8e3427; }

.ns-pop-results { margin-top: 62px; scroll-margin-top: 30px; }
.ns-pop-results.is-invalid { opacity: .42; pointer-events: none; }

.ns-pop-result-summary {
	display: grid;
	grid-template-columns: 54px minmax(0, 1fr) auto;
	align-items: center;
	gap: 20px;
	padding: 31px 34px;
	border: 1px solid #bddbd5;
	background: #e8f4f1;
}

.ns-pop-result-summary__status {
	display: grid;
	place-items: center;
	width: 54px;
	height: 54px;
	border-radius: 50%;
	background: var(--pop-teal);
	font-size: 25px;
	color: #fff;
}

.ns-pop-result-summary__status.is-decline { background: var(--pop-coral); }
.ns-pop-result-summary__status.is-stable { background: #6a7b78; }
.ns-pop-result-summary h2 { font-size: clamp(25px, 3vw, 34px); }
.ns-pop-result-summary h2 span { color: var(--pop-teal); }
.ns-pop-result-summary h2 strong { font-weight: 400; color: var(--pop-ink); }
.ns-pop-result-summary > div:nth-child(2) > p:last-child { margin: 8px 0 0; font-family: Georgia, 'Times New Roman', serif; font-size: 14px; line-height: 1.6; color: #506b65; }
.ns-pop-result-actions { display: flex; gap: 7px; }

.ns-pop-icon-button {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 37px;
	padding: 0 10px;
	border: 1px solid #b8d4ce;
	border-radius: 3px;
	background: rgba(255, 255, 255, .7);
	font: 800 9px/1 var(--wikipress-font-ui);
	color: var(--pop-teal);
	cursor: pointer;
}

.ns-pop-icon-button:hover { background: #fff; }
.ns-pop-icon-button svg { width: 14px; height: 14px; }

.ns-pop-result-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	margin-top: 16px;
	border: 1px solid var(--pop-line);
	background: #fff;
}

.ns-pop-result-grid article { position: relative; min-height: 170px; padding: 24px; }
.ns-pop-result-grid article + article { border-left: 1px solid var(--pop-line); }
.ns-pop-card-number { display: block; font-size: 9px; font-weight: 900; letter-spacing: .09em; color: var(--pop-coral); }
.ns-pop-result-grid p { margin: 20px 0 5px; font-size: 10px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; color: var(--pop-muted); }
.ns-pop-result-grid strong { display: block; font-family: Georgia, 'Times New Roman', serif; font-size: clamp(23px, 2.5vw, 32px); font-weight: 400; line-height: 1.1; color: var(--pop-ink); }
.ns-pop-result-grid small { display: block; margin-top: 7px; font-size: 9px; color: #7a8987; }

.ns-pop-trend,
.ns-pop-formulas,
.ns-pop-guide { margin-top: 80px; }
.ns-pop-section-heading h2,
.ns-pop-formulas h2,
.ns-pop-guide h2,
.ns-pop-next-tools h2 { font-size: clamp(30px, 4vw, 42px); }

.ns-pop-chart { margin-top: 28px; padding: 28px 31px 17px; border: 1px solid var(--pop-line); background: #fff; }
.ns-pop-chart__plot { width: 100%; }
.ns-pop-chart__svg { display: block; width: 100%; height: auto; max-height: 330px; }
.ns-pop-chart__svg .axis { stroke: #adbbb8; stroke-width: 1; }
.ns-pop-chart__svg .grid { stroke: #e7edeb; stroke-width: 1; stroke-dasharray: 4 6; }
.ns-pop-chart__svg .line { fill: none; stroke: var(--pop-teal); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.ns-pop-chart__svg .area { fill: rgba(13, 119, 108, .1); }
.ns-pop-chart__svg circle { fill: #fff; stroke: var(--pop-teal); stroke-width: 3; }
.ns-pop-chart__svg.is-decline .line { stroke: var(--pop-coral); }
.ns-pop-chart__svg.is-decline .area { fill: rgba(224, 108, 85, .1); }
.ns-pop-chart__svg.is-decline circle { stroke: var(--pop-coral); }
.ns-pop-chart__svg.is-stable .line { stroke: #6a7b78; }
.ns-pop-chart__svg text { font: 10px var(--wikipress-font-ui); fill: #768682; }
.ns-pop-chart__svg .value-label { font-weight: 900; fill: var(--pop-ink); }
.ns-pop-chart__legend { display: flex; justify-content: space-between; gap: 20px; padding-top: 13px; border-top: 1px solid #e8eeec; font-size: 10px; color: var(--pop-muted); }
.ns-pop-chart__legend span:first-child { display: flex; align-items: center; gap: 7px; }
.ns-pop-chart__legend i { width: 18px; height: 3px; background: var(--pop-teal); }

.ns-pop-formulas {
	display: grid;
	grid-template-columns: .72fr 1.28fr;
	gap: 64px;
	padding: 55px 58px;
	border-top: 4px solid var(--pop-coral);
	background: var(--pop-navy-dark);
	color: #fff;
}

.ns-pop-formulas .ns-pop-label { color: #f0a997; }
.ns-pop-formulas h2 { color: #fff; }
.ns-pop-formulas__intro > p:last-child { margin: 20px 0 0; font-family: Georgia, 'Times New Roman', serif; font-size: 15px; line-height: 1.7; color: #bac8cf; }
.ns-pop-formula-list { display: grid; gap: 0; }
.ns-pop-formula-list article { display: grid; grid-template-columns: 30px 1fr; gap: 13px; padding: 16px 0; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.ns-pop-formula-list article:first-child { padding-top: 0; }
.ns-pop-formula-list article:last-child { border-bottom: 0; }
.ns-pop-formula-list article > span { padding-top: 2px; font-size: 9px; font-weight: 900; letter-spacing: .08em; color: #f0a997; }
.ns-pop-formula-list h3 { margin: 0; font-size: 12px; color: #fff; }
.ns-pop-formula-list p { margin: 3px 0 7px; font-size: 10px; color: #91a5af; }
.ns-pop-formula-list code { display: block; overflow-x: auto; padding: 7px 9px; background: rgba(255, 255, 255, .07); font-size: 10px; color: #dce8ec; white-space: nowrap; }

.ns-pop-guide {
	display: grid;
	grid-template-columns: .55fr 1.45fr;
	gap: 62px;
}

.ns-pop-guide__grid { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--pop-line); background: #fff; }
.ns-pop-guide__grid article { padding: 25px; }
.ns-pop-guide__grid article + article { border-left: 1px solid var(--pop-line); }
.ns-pop-guide__grid h3 { margin: 0; font-size: 13px; color: var(--pop-ink); }
.ns-pop-guide__grid p { margin: 10px 0 0; font-family: Georgia, 'Times New Roman', serif; font-size: 13px; line-height: 1.65; color: #5a6e69; }
.ns-pop-guide__note { grid-column: 2; margin: -42px 0 0; padding: 16px 18px; border-left: 3px solid var(--pop-gold); background: #f9f3e8; font-size: 10px; line-height: 1.65; color: #665c48; }

.ns-pop-next-tools {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 30px;
	margin-top: 70px;
	padding: 34px 42px;
	border: 1px solid var(--pop-line);
	background: #fff;
}

.ns-pop-next-tools h2 { font-size: 28px; }
.ns-pop-next-tools > div:last-child { display: flex; gap: 8px; }
.ns-pop-next-tools a { padding: 12px 15px; border: 1px solid var(--pop-teal); border-radius: 3px; font-size: 11px; font-weight: 900; color: var(--pop-teal); }
.ns-pop-next-tools a:last-child { background: var(--pop-teal); color: #fff; }
.ns-pop-next-tools a:hover { background: var(--pop-teal-soft); text-decoration: none; }
.ns-pop-next-tools a:last-child:hover { background: #095e56; }

@media (max-width: 940px) {
	.ns-pop-hero { grid-template-columns: 1fr 250px; padding: 50px 45px 62px; }
	.ns-pop-fields { grid-template-columns: 1fr 42px 1fr; }
	.ns-pop-field--years { grid-column: 1 / -1; max-width: 260px; }
	.ns-pop-result-grid { grid-template-columns: repeat(2, 1fr); }
	.ns-pop-result-grid article:nth-child(3) { border-left: 0; border-top: 1px solid var(--pop-line); }
	.ns-pop-result-grid article:nth-child(4) { border-top: 1px solid var(--pop-line); }
	.ns-pop-formulas { grid-template-columns: 1fr; gap: 38px; }
	.ns-pop-guide { grid-template-columns: 1fr; gap: 28px; }
	.ns-pop-guide__note { grid-column: auto; margin: 0; }
}

@media (max-width: 680px) {
	.ns-pop__shell { width: min(100% - 28px, 1180px); padding-top: 14px; }
	.ns-pop-breadcrumbs { margin-bottom: 14px; }
	.ns-pop-hero { display: block; min-height: 0; padding: 38px 25px 43px; }
	.ns-pop-hero h1 { font-size: clamp(41px, 12.5vw, 58px); }
	.ns-pop-hero__copy > p:last-child { font-size: 15px; }
	.ns-pop-hero__visual { display: none; }
	.ns-pop-calculator { margin: -12px 0 0; padding: 25px 20px; }
	.ns-pop-calculator__heading,
	.ns-pop-section-heading { align-items: flex-start; flex-direction: column; gap: 9px; }
	.ns-pop-fields { grid-template-columns: 1fr; }
	.ns-pop-swap { justify-self: center; margin: 0; transform: rotate(90deg); }
	.ns-pop-swap:hover { transform: rotate(270deg); }
	.ns-pop-field--years { grid-column: auto; max-width: none; }
	.ns-pop-form-footer { align-items: stretch; flex-direction: column; }
	.ns-pop-presets { align-items: flex-start; }
	.ns-pop-presets > span { width: 100%; }
	.ns-pop-form-actions { width: 100%; }
	.ns-pop-button { flex: 1; }
	.ns-pop-results { margin-top: 48px; }
	.ns-pop-result-summary { grid-template-columns: 43px 1fr; padding: 25px 21px; }
	.ns-pop-result-summary__status { width: 43px; height: 43px; font-size: 20px; }
	.ns-pop-result-actions { grid-column: 1 / -1; }
	.ns-pop-result-grid { grid-template-columns: 1fr; }
	.ns-pop-result-grid article { min-height: 145px; }
	.ns-pop-result-grid article + article { border-top: 1px solid var(--pop-line); border-left: 0; }
	.ns-pop-trend,
	.ns-pop-formulas,
	.ns-pop-guide { margin-top: 60px; }
	.ns-pop-chart { padding: 18px 14px 14px; }
	.ns-pop-chart__legend { align-items: flex-start; flex-direction: column; gap: 6px; }
	.ns-pop-formulas { padding: 38px 24px; }
	.ns-pop-guide__grid { grid-template-columns: 1fr; }
	.ns-pop-guide__grid article + article { border-top: 1px solid var(--pop-line); border-left: 0; }
	.ns-pop-next-tools { align-items: flex-start; flex-direction: column; margin-top: 55px; padding: 28px 24px; }
	.ns-pop-next-tools > div:last-child { width: 100%; flex-direction: column; }
	.ns-pop-next-tools a { text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
	.ns-pop-swap { transition: none; }
	html { scroll-behavior: auto; }
}
