/*
 * Public site styles (front page, features, calculators, legal).
 * The logged-in app keeps using bootstrap + app.css.
 */

:root {
	--ink: #1b2430;
	--ink-2: #46515e;
	--muted: #66717d;
	--paper: #f5f7f6;
	--surface: #ffffff;
	--line: #d9e0dd;
	--line-strong: #b9c4bf;
	--green: #0e6b5c;
	--green-dark: #0a5247;
	--green-tint: #e2efeb;
	--bar: #6f9d92;
	--gold: #e9a91f;
	--gold-ink: #7a5000;
	--gold-tint: #fdf3dc;
	--red: #b93a26;

	--font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
	--font-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;

	--wrap: 1160px;
	--gutter: clamp(16px, 4vw, 32px);
	--radius: 14px;
	--radius-sm: 8px;
	--section: clamp(64px, 9vw, 120px);
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-padding-top: 88px;
}

body {
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 1.125rem;
	line-height: 1.6;
	margin: 0;
	text-rendering: optimizeLegibility;
}

img,
svg {
	display: block;
	max-width: 100%;
}

h1,
h2,
h3 {
	font-family: var(--font-display);
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.1;
	margin: 0 0 0.5em;
	text-wrap: balance;
}

h1 {
	font-size: clamp(2.4rem, 5.2vw, 3.9rem);
	letter-spacing: -0.035em;
	line-height: 1.02;
}

h2 {
	font-size: clamp(1.75rem, 3.2vw, 2.5rem);
}

h3,
.h3 {
	font-size: 1.3rem;
	letter-spacing: -0.01em;
}

p {
	margin: 0 0 1em;
}

a {
	color: var(--green);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

a:hover {
	color: var(--green-dark);
	text-decoration-thickness: 2px;
}

:focus-visible {
	outline: 3px solid var(--gold);
	outline-offset: 2px;
	border-radius: 4px;
}

.visually-hidden {
	border: 0;
	clip: rect(0 0 0 0);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	white-space: nowrap;
	width: 1px;
}

.skip-link {
	background: var(--ink);
	color: #fff;
	left: 16px;
	padding: 8px 14px;
	position: absolute;
	top: -60px;
	z-index: 100;
}

.skip-link:focus {
	top: 12px;
}

.wrap {
	margin: 0 auto;
	max-width: var(--wrap);
	padding: 0 var(--gutter);
}

.num {
	font-variant-numeric: tabular-nums;
	text-align: right;
	white-space: nowrap;
}

.lead {
	color: var(--ink-2);
	font-size: clamp(1.15rem, 1.6vw, 1.3rem);
	line-height: 1.55;
	max-width: 38em;
}

.measure {
	max-width: 40em;
}

/* Buttons */

.btn {
	align-items: center;
	border: 2px solid transparent;
	border-radius: 999px;
	cursor: pointer;
	display: inline-flex;
	font-family: var(--font-body);
	font-size: 1rem;
	font-weight: 700;
	gap: 8px;
	justify-content: center;
	line-height: 1.2;
	padding: 12px 22px;
	text-decoration: none;
	transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.btn-solid {
	background: var(--green);
	color: #fff;
}

.btn-solid:hover {
	background: var(--green-dark);
	color: #fff;
}

.btn-line {
	border-color: var(--line-strong);
	color: var(--ink);
}

.btn-line:hover {
	border-color: var(--ink);
	color: var(--ink);
}

.btn-light {
	background: #fff;
	color: var(--green-dark);
}

.btn-light:hover {
	background: var(--gold-tint);
	color: var(--green-dark);
}

.btn-quiet {
	background: none;
	border: 0;
	color: var(--green);
	padding: 8px 0;
}

.btn-quiet:hover {
	color: var(--green-dark);
	text-decoration: underline;
}

.actions {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 12px 20px;
	margin-top: 28px;
}

.fineprint {
	color: var(--muted);
	font-size: 0.95rem;
	margin: 14px 0 0;
}

/* Header */

.site-header {
	backdrop-filter: saturate(1.4) blur(10px);
	background: rgba(245, 247, 246, 0.9);
	border-bottom: 1px solid var(--line);
	position: sticky;
	top: 0;
	z-index: 50;
}

.site-header-inner {
	align-items: center;
	display: flex;
	gap: 24px;
	min-height: 68px;
}

.brand {
	align-items: center;
	color: var(--ink);
	display: inline-flex;
	font-family: var(--font-display);
	font-size: 1.2rem;
	font-weight: 700;
	gap: 10px;
	letter-spacing: -0.02em;
	text-decoration: none;
	white-space: nowrap;
}

.brand:hover {
	color: var(--ink);
}

.site-nav {
	align-items: center;
	display: flex;
	flex: 1;
	gap: 24px;
}

.nav-list,
.nav-list ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.nav-list {
	align-items: center;
	display: flex;
	gap: 4px;
	margin-left: 12px;
}

.nav-list a {
	border-radius: var(--radius-sm);
	color: var(--ink-2);
	display: block;
	font-weight: 600;
	padding: 8px 12px;
	text-decoration: none;
}

.nav-list a:hover,
.nav-list a[aria-current] {
	color: var(--ink);
}

.nav-list a[aria-current] {
	box-shadow: inset 0 -2px 0 var(--green);
	border-radius: 0;
}

.nav-group {
	position: relative;
}

.nav-group-label {
	color: var(--ink-2);
	cursor: default;
	display: block;
	font-weight: 600;
	padding: 8px 12px;
}

.nav-group-label::after {
	border-bottom: 2px solid currentColor;
	border-right: 2px solid currentColor;
	content: "";
	display: inline-block;
	height: 6px;
	margin-left: 8px;
	transform: translateY(-3px) rotate(45deg);
	width: 6px;
}

.nav-group ul {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	box-shadow: 0 12px 32px rgba(27, 36, 48, 0.12);
	left: 0;
	min-width: 240px;
	opacity: 0;
	padding: 6px;
	position: absolute;
	top: 100%;
	transform: translateY(4px);
	transition: opacity 0.12s, transform 0.12s, visibility 0.12s;
	visibility: hidden;
}

.nav-group:hover ul,
.nav-group:focus-within ul {
	opacity: 1;
	transform: none;
	visibility: visible;
}

.nav-group ul a[aria-current] {
	background: var(--green-tint);
	box-shadow: none;
	border-radius: var(--radius-sm);
}

.nav-actions {
	align-items: center;
	display: flex;
	gap: 16px;
	margin-left: auto;
}

.nav-login {
	color: var(--ink);
	font-weight: 600;
	text-decoration: none;
}

.nav-actions .btn {
	padding: 9px 18px;
}

.nav-toggle {
	background: none;
	border: 0;
	cursor: pointer;
	display: none;
	height: 44px;
	margin-left: auto;
	padding: 10px;
	width: 44px;
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
	background: var(--ink);
	border-radius: 2px;
	display: block;
	height: 2px;
	position: relative;
	transition: transform 0.15s;
	width: 24px;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
	content: "";
	position: absolute;
}

.nav-toggle-bars::before {
	top: -7px;
}

.nav-toggle-bars::after {
	top: 7px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars {
	background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before {
	transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after {
	transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 960px) {
	.nav-toggle {
		display: block;
	}

	.site-nav {
		background: var(--paper);
		border-bottom: 1px solid var(--line);
		display: none;
		flex-direction: column;
		align-items: stretch;
		gap: 16px;
		left: 0;
		padding: 8px var(--gutter) 24px;
		position: absolute;
		right: 0;
		top: 100%;
	}

	.site-nav.is-open {
		display: flex;
	}

	.nav-list {
		align-items: stretch;
		flex-direction: column;
		margin: 0;
	}

	.nav-list a,
	.nav-group-label {
		padding: 12px 0;
	}

	.nav-list a[aria-current] {
		box-shadow: none;
		color: var(--green);
	}

	.nav-group-label {
		color: var(--muted);
		font-size: 0.95rem;
	}

	.nav-group-label::after {
		display: none;
	}

	.nav-group ul {
		background: none;
		border: 0;
		box-shadow: none;
		opacity: 1;
		padding: 0 0 0 16px;
		position: static;
		transform: none;
		visibility: visible;
	}

	.nav-group ul a[aria-current] {
		background: none;
	}

	.nav-actions {
		justify-content: space-between;
		margin: 0;
	}
}

/* Sections */

.section {
	padding: var(--section) 0;
}

.section.section-flush {
	padding-top: 0;
}

.section-rule {
	border-top: 1px solid var(--line);
}

.section-white {
	background: var(--surface);
	border-bottom: 1px solid var(--line);
	border-top: 1px solid var(--line);
}

.section-head {
	margin-bottom: 40px;
	max-width: 42em;
}

.section-head p {
	color: var(--ink-2);
}

/* Hero */

.hero {
	padding: clamp(40px, 7vw, 88px) 0 var(--section);
}

.hero-grid {
	align-items: center;
	display: grid;
	gap: clamp(32px, 5vw, 64px);
	grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
}

.hero-copy .lead {
	margin-top: 20px;
}

@media (max-width: 900px) {
	.hero-grid {
		grid-template-columns: 1fr;
	}
}

.page-hero {
	padding: clamp(32px, 5vw, 64px) 0 clamp(40px, 5vw, 64px);
}

.page-hero .lead {
	margin-top: 16px;
}

/* Breadcrumbs */

.breadcrumbs ol {
	color: var(--muted);
	display: flex;
	flex-wrap: wrap;
	font-size: 0.95rem;
	gap: 6px;
	list-style: none;
	margin: 0 0 20px;
	padding: 0;
}

.breadcrumbs li + li::before {
	color: var(--line-strong);
	content: "/";
	margin-right: 6px;
}

.breadcrumbs a {
	color: var(--muted);
}

/* Year strip: the signature chart */

.yearstrip {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	margin: 0;
	padding: clamp(18px, 3vw, 28px);
}

.ys-plot {
	height: clamp(220px, 30vw, 320px);
	position: relative;
}

.ys-bars {
	align-items: end;
	display: grid;
	gap: clamp(4px, 1vw, 10px);
	grid-template-columns: repeat(12, 1fr);
	height: 100%;
	position: relative;
}

.ys-col {
	align-items: center;
	display: flex;
	flex-direction: column;
	height: 100%;
	justify-content: flex-end;
	position: relative;
}

.ys-bar {
	background: var(--bar);
	border-radius: 5px 5px 0 0;
	height: var(--h);
	width: 100%;
}

.ys-col.is-peak .ys-bar {
	background: var(--green);
}

.ys-peak {
	bottom: calc(var(--h) + 6px);
	color: var(--ink);
	font-size: 0.8rem;
	font-weight: 700;
	left: 50%;
	line-height: 1.15;
	position: absolute;
	text-align: center;
	transform: translateX(-50%);
	white-space: nowrap;
}

.ys-transfer {
	border-top: 3px dashed var(--gold);
	bottom: var(--y);
	left: 0;
	position: absolute;
	right: 0;
	z-index: 2;
}

.ys-transfer span {
	background: var(--gold);
	border-radius: 999px;
	color: var(--ink);
	font-size: 0.85rem;
	font-weight: 700;
	padding: 3px 10px;
	position: absolute;
	right: 0;
	top: -15px;
	white-space: nowrap;
}

.ys-line {
	height: 100%;
	inset: 0;
	overflow: visible;
	pointer-events: none;
	position: absolute;
	width: 100%;
	z-index: 1;
}

.ys-dot {
	background: var(--ink);
	border: 2px solid var(--surface);
	border-radius: 50%;
	height: 10px;
	margin: 0 0 -5px -5px;
	position: absolute;
	width: 10px;
	z-index: 1;
}

.ys-months {
	border-top: 1px solid var(--line-strong);
	color: var(--muted);
	display: grid;
	font-size: 0.85rem;
	gap: clamp(4px, 1vw, 10px);
	grid-template-columns: repeat(12, 1fr);
	padding-top: 8px;
	text-align: center;
}

.ys-caption {
	color: var(--ink-2);
	font-size: 0.98rem;
	margin-top: 16px;
}

.legend {
	color: var(--ink-2);
	display: flex;
	flex-wrap: wrap;
	font-size: 0.95rem;
	gap: 8px 20px;
	list-style: none;
	margin: 16px 0 0;
	padding: 0;
}

.legend li {
	align-items: center;
	display: inline-flex;
	gap: 8px;
}

.legend .swatch {
	border-radius: 3px;
	display: inline-block;
	height: 12px;
	width: 12px;
}

.legend .swatch-line {
	border-radius: 2px;
	height: 3px;
	width: 18px;
}

@media (max-width: 560px) {
	.ys-peak {
		font-size: 0.7rem;
	}

	.ys-months span {
		font-size: 0.72rem;
	}
}

/* Two-column text + aside */

.split {
	display: grid;
	gap: clamp(32px, 5vw, 72px);
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.split-center {
	align-items: center;
}

@media (max-width: 820px) {
	.split {
		grid-template-columns: 1fr;
	}
}

.checklist {
	list-style: none;
	margin: 0;
	padding: 0;
}

.checklist li {
	border-top: 1px solid var(--line);
	padding: 16px 0 16px 40px;
	position: relative;
}

.checklist li:last-child {
	border-bottom: 1px solid var(--line);
}

.checklist li::before {
	background: var(--green-tint);
	border-radius: 50%;
	content: "";
	height: 26px;
	left: 0;
	position: absolute;
	top: 17px;
	width: 26px;
}

.checklist li::after {
	border-bottom: 2.5px solid var(--green);
	border-right: 2.5px solid var(--green);
	content: "";
	height: 11px;
	left: 10px;
	position: absolute;
	top: 22px;
	transform: rotate(45deg);
	width: 6px;
}

/* Steps: a real sequence, so it is numbered */

.steps {
	counter-reset: step;
	display: grid;
	gap: 32px;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	list-style: none;
	margin: 0;
	padding: 0;
}

.steps li {
	border-top: 3px solid var(--ink);
	counter-increment: step;
	padding-top: 20px;
}

.steps li::before {
	color: var(--green);
	content: counter(step);
	display: block;
	font-family: var(--font-display);
	font-size: 3rem;
	font-weight: 700;
	line-height: 1;
	margin-bottom: 16px;
}

.steps p {
	color: var(--ink-2);
	margin: 0;
}

@media (max-width: 820px) {
	.steps {
		grid-template-columns: 1fr;
	}
}

/* Feature rows */

.feature + .feature {
	margin-top: clamp(64px, 8vw, 112px);
}

.explain p {
	color: var(--ink-2);
	max-width: 36em;
}

.feature p {
	color: var(--ink-2);
}

.link-arrow {
	font-weight: 700;
}

.transfers {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	margin: 0;
	padding: 8px 24px 20px;
}

.transfers table {
	border-collapse: collapse;
	width: 100%;
}

.transfers caption {
	caption-side: bottom;
	color: var(--muted);
	font-size: 0.95rem;
	padding-top: 12px;
	text-align: left;
}

.transfers td {
	border-bottom: 1px solid var(--line);
	padding: 14px 0;
}

.transfers td.num {
	font-family: var(--font-display);
	font-size: 1.3rem;
	font-weight: 700;
}

/* Data tables */

.table-wrap {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow-x: auto;
}

.data {
	border-collapse: collapse;
	font-size: 0.95rem;
	min-width: 100%;
}

.data caption {
	color: var(--muted);
	font-size: 0.95rem;
	padding: 14px 16px 0;
	text-align: left;
}

.data th,
.data td {
	border-bottom: 1px solid var(--line);
	padding: 10px 16px;
	text-align: left;
	white-space: nowrap;
}

.data thead th {
	color: var(--muted);
	font-weight: 600;
}

.data th.num,
.data td.num {
	text-align: right;
}

.data tbody tr:last-child th,
.data tbody tr:last-child td {
	border-bottom: 0;
}

.data tfoot th,
.data tfoot td {
	border-bottom: 0;
	border-top: 2px solid var(--ink);
	font-weight: 700;
}

.data .zero {
	color: var(--line-strong);
}

.data .pos {
	color: var(--green);
}

.data .neg {
	color: var(--red);
}

.data .sticky {
	background: var(--surface);
	left: 0;
	position: sticky;
}

/* Tool links */

.tool-list {
	display: grid;
	gap: 24px;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	list-style: none;
	margin: 0;
	padding: 0;
}

.tool-list a {
	border-top: 3px solid var(--green);
	color: var(--ink);
	display: block;
	height: 100%;
	padding-top: 16px;
	text-decoration: none;
}

.tool-list a:hover h3,
.tool-list a:focus-visible h3 {
	color: var(--green);
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 0.18em;
}

.tool-list p {
	color: var(--ink-2);
	margin: 0;
}

@media (max-width: 820px) {
	.tool-list {
		grid-template-columns: 1fr;
	}
}

/* Story */

.story {
	align-items: center;
	display: grid;
	gap: clamp(28px, 5vw, 64px);
	grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
}

.story img {
	aspect-ratio: 1;
	border-radius: var(--radius);
	height: auto;
	object-fit: cover;
	width: 100%;
}

.story p {
	color: var(--ink-2);
}

@media (max-width: 720px) {
	.story {
		grid-template-columns: 1fr;
	}

	.story img {
		max-width: 280px;
	}
}

/* FAQ */

.faq {
	border-top: 1px solid var(--line);
	max-width: 48em;
}

.faq details {
	border-bottom: 1px solid var(--line);
}

.faq summary {
	cursor: pointer;
	font-family: var(--font-display);
	font-size: 1.2rem;
	font-weight: 700;
	letter-spacing: -0.01em;
	list-style: none;
	padding: 20px 40px 20px 0;
	position: relative;
}

.faq summary::-webkit-details-marker {
	display: none;
}

.faq summary::after {
	border-bottom: 2px solid var(--ink);
	border-right: 2px solid var(--ink);
	content: "";
	height: 9px;
	position: absolute;
	right: 8px;
	top: 26px;
	transform: rotate(45deg);
	transition: transform 0.15s;
	width: 9px;
}

.faq details[open] summary::after {
	transform: translateY(4px) rotate(-135deg);
}

.faq.faq-single {
	border: 0;
	margin-top: 16px;
	max-width: none;
}

.faq.faq-single summary {
	display: inline-block;
	font-family: var(--font-body);
	font-size: 1.05rem;
	color: var(--green);
}

.faq details p {
	color: var(--ink-2);
	margin: 0 0 20px;
	max-width: 40em;
}

/* CTA band */

.cta-band {
	background: var(--green);
	color: #fff;
	padding: clamp(56px, 8vw, 96px) 0;
}

.cta-band h2 {
	color: #fff;
}

.cta-band p {
	color: rgba(255, 255, 255, 0.85);
	font-size: 1.2rem;
	max-width: 34em;
}

.cta-band .actions {
	margin-top: 24px;
}

/* Feature detail lists */

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

.detail-grid h3 {
	margin-bottom: 8px;
}

.detail-grid p {
	color: var(--ink-2);
	margin: 0;
}

.detail-grid-3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 820px) {
	.detail-grid,
	.detail-grid-3 {
		grid-template-columns: 1fr;
	}
}

.account-sum {
	border-collapse: collapse;
	width: 100%;
}

.account-sum td,
.account-sum th {
	border-bottom: 1px solid var(--line);
	font-weight: 400;
	padding: 12px 0;
	text-align: left;
}

.account-sum .in th,
.account-sum .in td {
	font-weight: 700;
}

.account-sum .sub td,
.account-sum .sub th {
	color: var(--muted);
	padding-left: 16px;
}

.account-sum .total th,
.account-sum .total td {
	border-bottom: 0;
	border-top: 2px solid var(--ink);
	font-weight: 700;
}

.account-sum .left td {
	color: var(--green);
	font-family: var(--font-display);
	font-size: 1.4rem;
}

/* Calculators */

.calc {
	align-items: start;
	display: grid;
	gap: clamp(24px, 4vw, 48px);
	grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
}

.calc.calc-stack {
	grid-template-columns: 1fr;
}

.calc-out {
	align-items: start;
	display: grid;
	gap: 32px;
	grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
}

@media (max-width: 900px) {
	.calc-out {
		grid-template-columns: 1fr;
	}
}

.stack {
	margin-top: 28px;
}

.stack-lg {
	margin-top: 56px;
}

@media (max-width: 900px) {
	.calc {
		grid-template-columns: 1fr;
	}
}

.panel {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: clamp(20px, 3vw, 28px);
}

.panel h2 {
	font-size: 1.3rem;
	margin-bottom: 16px;
}

.field {
	margin-bottom: 18px;
}

.field label {
	display: block;
	font-size: 0.98rem;
	font-weight: 600;
	margin-bottom: 6px;
}

.input,
.select {
	appearance: none;
	background: var(--surface);
	border: 1.5px solid var(--line-strong);
	border-radius: var(--radius-sm);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 1.05rem;
	font-variant-numeric: tabular-nums;
	min-height: 46px;
	padding: 10px 12px;
	width: 100%;
}

.select {
	background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
	background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
	background-repeat: no-repeat;
	background-size: 5px 5px;
	padding-right: 36px;
}

.input:focus,
.select:focus {
	border-color: var(--green);
	outline: 3px solid var(--green-tint);
	outline-offset: 0;
}

.input[aria-invalid="true"] {
	border-color: var(--red);
}

.field-row {
	display: grid;
	gap: 12px;
	grid-template-columns: 1fr 1fr;
}

.results {
	display: grid;
	gap: 1px;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	margin-bottom: 24px;
}

.result {
	border-left: 3px solid var(--line);
	padding: 4px 0 4px 16px;
}

.result:first-child {
	border-left-color: var(--gold);
}

.result dt {
	color: var(--ink-2);
	font-size: 0.95rem;
}

.result dd {
	font-family: var(--font-display);
	font-size: clamp(1.4rem, 2.6vw, 2rem);
	font-variant-numeric: tabular-nums;
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.2;
	margin: 2px 0 0;
}

.result small {
	color: var(--muted);
	display: block;
	font-family: var(--font-body);
	font-size: 0.9rem;
	font-weight: 400;
	letter-spacing: 0;
}

@media (max-width: 560px) {
	.results {
		gap: 16px;
		grid-template-columns: 1fr;
	}
}

.chart {
	margin: 0;
}

.chart h3 {
	font-family: var(--font-body);
	font-size: 1rem;
	font-weight: 600;
	letter-spacing: 0;
}

.chart svg {
	height: auto;
	overflow: visible;
	width: 100%;
}

.chart .axis text {
	fill: var(--muted);
	font-family: var(--font-body);
	font-size: 12px;
}

.chart .grid line {
	stroke: var(--line);
}

.note {
	background: var(--gold-tint);
	border-radius: var(--radius-sm);
	color: var(--gold-ink);
	font-weight: 600;
	margin: 0 0 20px;
	padding: 10px 14px;
}

/* Bills editor */

.bills {
	border-collapse: collapse;
	width: 100%;
}

.bills th {
	color: var(--muted);
	font-size: 0.9rem;
	font-weight: 600;
	padding: 0 8px 6px 0;
	text-align: left;
}

.bills td {
	padding: 0 8px 8px 0;
	vertical-align: middle;
}

.bills td:last-child,
.bills th:last-child {
	padding-right: 0;
	width: 44px;
}

.bills .input,
.bills .select {
	font-size: 1rem;
	min-height: 42px;
	padding: 8px 10px;
}

.bills .select {
	padding-right: 30px;
}

.bills .col-amount {
	width: 18%;
}

.bills .col-freq,
.bills .col-month {
	width: 20%;
}

.icon-btn {
	align-items: center;
	background: none;
	border: 0;
	border-radius: var(--radius-sm);
	color: var(--muted);
	cursor: pointer;
	display: inline-flex;
	height: 42px;
	justify-content: center;
	width: 42px;
}

.icon-btn:hover {
	background: var(--paper);
	color: var(--red);
}

@media (max-width: 640px) {
	.bills thead {
		display: none;
	}

	.bills,
	.bills tbody,
	.bills tr,
	.bills td {
		display: block;
		width: auto !important;
	}

	.bills tr {
		border-bottom: 1px solid var(--line);
		display: grid;
		gap: 8px;
		grid-template-columns: repeat(3, minmax(0, 1fr)) 44px;
		margin-bottom: 12px;
		padding-bottom: 12px;
	}

	.bills td {
		padding: 0;
	}

	.bills td:first-child {
		grid-column: 1 / 4;
	}

	.bills td:last-child {
		grid-column: 4;
		grid-row: 1;
	}

	.bills .select {
		padding-left: 8px;
		padding-right: 24px;
		background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%;
	}
}

/* Prose (about, legal) */

.prose {
	max-width: 42em;
}

.prose h2 {
	font-size: 1.6rem;
	margin-top: 2em;
}

.prose > h2:first-child {
	margin-top: 0;
}

.prose h3 {
	margin-top: 1.5em;
}

.prose ol,
.prose ul {
	padding-left: 1.4em;
}

.prose li {
	margin-bottom: 0.5em;
}

.prose table {
	border-collapse: collapse;
	margin-bottom: 1em;
	width: 100%;
}

.prose td {
	border-bottom: 1px solid var(--line);
	padding: 10px 12px 10px 0;
	vertical-align: top;
}

.lang-note {
	background: var(--gold-tint);
	border-radius: var(--radius-sm);
	color: var(--gold-ink);
	padding: 10px 14px;
}

/* Footer */

.site-footer {
	background: var(--ink);
	color: rgba(255, 255, 255, 0.78);
	font-size: 1rem;
	padding: 64px 0 32px;
}

.site-footer a {
	color: #fff;
	text-decoration: none;
}

.site-footer a:hover {
	text-decoration: underline;
}

.site-footer .brand {
	color: #fff;
	margin-bottom: 12px;
}

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

.footer-brand p {
	max-width: 26em;
}

.footer-heading {
	color: #fff;
	font-family: var(--font-body);
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: 0;
	margin-bottom: 12px;
}

.site-footer ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.site-footer li {
	margin-bottom: 8px;
}

.footer-bottom {
	align-items: center;
	border-top: 1px solid rgba(255, 255, 255, 0.15);
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	justify-content: space-between;
	margin-top: 48px;
	padding-top: 24px;
}

.footer-bottom p {
	margin: 0;
}

.site-footer .lang-switch {
	display: flex;
	gap: 8px;
}

.lang-switch li {
	margin: 0;
}

.lang-switch a {
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: 999px;
	display: block;
	padding: 4px 14px;
}

.lang-switch a[aria-current] {
	background: #fff;
	color: var(--ink);
}

@media (max-width: 820px) {
	.footer-grid {
		grid-template-columns: 1fr 1fr;
	}

	.footer-brand {
		grid-column: 1 / -1;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition: none !important;
	}
}
