/*
 * Level Investment Calculators
 * Level Africa purple palette, taken from the level.africa logo and "Start Investing" button.
 * Fonts inherit from the page.
 */
.lvc {
	--lvc-brand: #662d8c;        /* Level purple (buttons, selected states) */
	--lvc-brand-dark: #4e1f6e;   /* hover, headline panel */
	--lvc-brand-light: #9b6bc2;  /* secondary bars */
	--lvc-tint: #f3edf8;         /* soft purple background */
	--lvc-ink: #1c1c1c;
	--lvc-line: rgba(78, 31, 110, 0.16);
	--lvc-soft: rgba(102, 45, 140, 0.07);
	--lvc-surface: #ffffff;
	--lvc-radius: 14px;
	font-family: inherit;
	color: var(--lvc-ink);
	line-height: 1.5;
	max-width: 880px;
	margin: 0 auto;
}
.lvc *,
.lvc *::before,
.lvc *::after { box-sizing: border-box; }

/* Demonstration notice */
.lvc .lvc-notice {
	border-left: 3px solid var(--lvc-brand);
	background: var(--lvc-tint);
	padding: 12px 16px;
	border-radius: 0 6px 6px 0;
	font-size: 0.92em;
	margin: 0 0 24px;
}

/* Form */
.lvc .lvc-form {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
	gap: 16px 20px;
	margin: 0 0 28px;
}
.lvc .lvc-field { margin: 0; padding: 0; border: 0; min-width: 0; }
.lvc .lvc-field-wide { grid-column: 1 / -1; }
.lvc .lvc-field > label,
.lvc .lvc-field > legend,
.lvc .lvc-detail-head label {
	display: block;
	font-weight: 600;
	font-size: 0.9em;
	margin: 0 0 6px;
	padding: 0;
}
.lvc input.lvc-input,
.lvc select.lvc-input {
	width: 100%;
	min-height: 46px;
	padding: 10px 12px;
	border: 1px solid var(--lvc-line);
	border-radius: 8px;
	background: var(--lvc-surface);
	color: inherit;
	font: inherit;
	font-variant-numeric: tabular-nums;
}
.lvc .lvc-input:focus { border-color: var(--lvc-brand); box-shadow: 0 0 0 3px rgba(102, 45, 140, 0.18); outline: none; }

/* Segmented choice (currency, bond type) */
.lvc .lvc-seg {
	display: flex;
	border: 1px solid var(--lvc-line);
	border-radius: 999px;
	overflow: hidden;
	background: var(--lvc-surface);
	padding: 4px;
	gap: 4px;
}
.lvc .lvc-seg label { flex: 1; margin: 0; cursor: pointer; }
.lvc .lvc-seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.lvc .lvc-seg span {
	display: block;
	text-align: center;
	padding: 10px 14px;
	border-radius: 999px;
	font-weight: 500;
	font-size: 0.92em;
	transition: background-color 0.15s ease;
}
.lvc .lvc-seg label:hover input:not(:checked) + span { background: var(--lvc-tint); }
.lvc .lvc-seg input:checked + span { background: var(--lvc-brand); color: #fff; }
.lvc .lvc-seg input:focus-visible + span { outline: 2px solid var(--lvc-brand); outline-offset: -4px; }

/* Unit trust comparison bars */
.lvc .lvc-headline { font-weight: 600; margin: 0 0 8px; }
.lvc .lvc-bars { list-style: none; margin: 0 0 28px; padding: 0; }
.lvc .lvc-bar { padding: 14px 0; border-top: 1px solid var(--lvc-line); margin: 0; }
.lvc .lvc-bar:last-child { border-bottom: 1px solid var(--lvc-line); }
.lvc .lvc-bar-top,
.lvc .lvc-bar-sub {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 4px 16px;
	flex-wrap: wrap;
}
.lvc .lvc-bar-name { font-weight: 600; }
.lvc .lvc-bar-value { font-weight: 700; font-size: 1.1em; font-variant-numeric: tabular-nums; }
.lvc .lvc-bar-sub { font-size: 0.85em; margin-top: 2px; }
.lvc .lvc-bar-meta { opacity: 0.7; }
.lvc .lvc-bar-earn { color: var(--lvc-brand); font-weight: 600; font-variant-numeric: tabular-nums; }
.lvc .lvc-track { height: 8px; background: var(--lvc-tint); border-radius: 4px; margin-top: 10px; overflow: hidden; }
.lvc .lvc-fill { height: 100%; background: var(--lvc-brand-light); border-radius: 4px; transition: width 0.35s ease; }
.lvc .lvc-bar:first-child .lvc-fill { background: var(--lvc-brand); }

.lvc .lvc-detail-head { max-width: 420px; margin-bottom: 12px; }

/* Bond lead figure and summary */
.lvc .lvc-lead {
	background: var(--lvc-brand);
	background: linear-gradient(135deg, var(--lvc-brand) 0%, var(--lvc-brand-dark) 100%);
	color: #fff;
	border-radius: var(--lvc-radius);
	padding: 20px 22px;
	margin: 0 0 16px;
}
.lvc .lvc-lead span { display: block; font-size: 0.9em; opacity: 0.85; }
.lvc .lvc-lead strong {
	display: block;
	font-size: clamp(1.7em, 4.5vw, 2.4em);
	line-height: 1.15;
	margin-top: 4px;
	font-variant-numeric: tabular-nums;
}
.lvc .lvc-summary {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
	gap: 1px;
	background: var(--lvc-line);
	border: 1px solid var(--lvc-line);
	border-radius: var(--lvc-radius);
	overflow: hidden;
	margin: 0 0 20px;
}
.lvc .lvc-summary > div { background: var(--lvc-surface); padding: 14px 16px; }
.lvc .lvc-summary dt { font-size: 0.85em; opacity: 0.7; margin: 0; }
.lvc .lvc-summary dd { margin: 2px 0 0; font-weight: 700; font-variant-numeric: tabular-nums; }

.lvc .lvc-schedule { margin: 0 0 24px; }
.lvc .lvc-schedule summary { cursor: pointer; font-weight: 600; padding: 8px 0; color: var(--lvc-brand); }

/* Tables */
.lvc .lvc-table-wrap { overflow-x: auto; }
.lvc table.lvc-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9em;
	font-variant-numeric: tabular-nums;
	margin: 0;
	border: 0;
}
.lvc .lvc-table th,
.lvc .lvc-table td {
	padding: 9px 10px;
	border: 0;
	border-bottom: 1px solid var(--lvc-line);
	text-align: right;
	white-space: nowrap;
	background: transparent;
}
.lvc .lvc-table thead th { font-weight: 600; font-size: 0.92em; border-bottom-width: 2px; }
.lvc .lvc-table th[scope="row"],
.lvc .lvc-table thead th:first-child { text-align: left; font-weight: 500; }
.lvc .lvc-table tr.lvc-maturity th,
.lvc .lvc-table tr.lvc-maturity td { font-weight: 700; }

/* Footer */
.lvc .lvc-empty { padding: 16px; background: var(--lvc-tint); border-radius: 8px; margin: 0 0 24px; }
.lvc .lvc-foot { font-size: 0.82em; opacity: 0.75; margin: 20px 0; }
.lvc .lvc-cta-row { margin-top: 8px; }
.lvc a.lvc-cta {
	display: inline-block;
	background: var(--lvc-brand);
	color: #fff;
	padding: 14px 30px;
	border-radius: 999px;
	font-weight: 600;
	text-decoration: none;
	transition: background-color 0.15s ease;
}
.lvc a.lvc-cta:hover { background: var(--lvc-brand-dark); color: #fff; }
.lvc a.lvc-cta:focus-visible { outline: 2px solid var(--lvc-brand); outline-offset: 3px; }

@media (max-width: 540px) {
	.lvc .lvc-seg { flex-direction: column; border-radius: 22px; }
}
@media (prefers-reduced-motion: reduce) {
	.lvc .lvc-fill,
	.lvc .lvc-seg span,
	.lvc a.lvc-cta { transition: none; }
}

/* Coupon payment explanation */
.lvc .lvc-explain {
	background: var(--lvc-tint);
	border-radius: 10px;
	padding: 12px 16px;
	font-size: 0.92em;
	margin: 0 0 20px;
}
.lvc .lvc-table tr.lvc-maturity td[colspan] { text-align: left; font-weight: 500; }

.lvc .lvc-hint { font-size: 0.82em; opacity: 0.75; margin: 6px 0 0; min-height: 1.2em; }
.lvc select.lvc-input option:disabled { color: #b5adbd; }
