/**
 * Self-contained calculator styles.
 * Palette: ink #1a1a1a, slate #3e4a59, line #d0d7e2, paper #ffffff, canvas #f3f5f8, steel #1f4e79.
 */

.biwpc {
	--biwpc-ink: #1a1a1a;
	--biwpc-slate: #3e4a59;
	--biwpc-line: #d0d7e2;
	--biwpc-paper: #ffffff;
	--biwpc-canvas: #f3f5f8;
	--biwpc-steel: #1f4e79;
	--biwpc-steel-dark: #163a5c;
	--biwpc-error: #8c1d1d;
	--biwpc-warning: #6a4b00;
	--biwpc-warning-bg: #fff6df;
	box-sizing: border-box;
	max-width: 46rem;
	margin: 1.5rem auto 3rem;
	padding: 1.75rem 1.5rem 2.5rem;
	border: 1px solid var(--biwpc-line);
	background: var(--biwpc-paper);
	color: var(--biwpc-ink);
	color-scheme: light;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 1.0625rem;
	line-height: 1.65;
}

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

.biwpc h1 {
	margin: 0 0 1rem;
	color: var(--biwpc-ink);
	font-size: 2rem;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.02em;
}

.biwpc h2 {
	margin: 2.4rem 0 0.75rem;
	color: var(--biwpc-ink);
	font-size: 1.45rem;
	font-weight: 700;
	line-height: 1.25;
}

.biwpc h3 {
	margin: 1.6rem 0 0.45rem;
	color: var(--biwpc-ink);
	font-size: 1.12rem;
	font-weight: 700;
	line-height: 1.35;
}

.biwpc p {
	margin: 0 0 1rem;
}

.biwpc-above p,
.biwpc-below p,
.biwpc-faq p {
	max-width: 65ch;
}

.biwpc a {
	color: var(--biwpc-steel);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.15em;
}

.biwpc a:hover {
	color: var(--biwpc-steel-dark);
}

.biwpc-tool h2 {
	margin-top: 2rem;
}

.biwpc-progress-label {
	margin: 0 0 0.4rem;
	font-weight: 600;
}

.biwpc progress {
	display: block;
	width: 100%;
	height: 0.55rem;
	margin: 0 0 1.4rem;
	border: 0;
	background: #e6ebf1;
	appearance: none;
	-webkit-appearance: none;
}

.biwpc progress::-webkit-progress-bar {
	background: #e6ebf1;
}

.biwpc progress::-webkit-progress-value {
	background: var(--biwpc-steel);
}

.biwpc progress::-moz-progress-bar {
	background: var(--biwpc-steel);
}

.biwpc fieldset {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.biwpc legend {
	padding: 0;
}

.biwpc-step-heading {
	display: block;
	margin-bottom: 1rem;
	font-size: 1.3rem;
	font-weight: 700;
	line-height: 1.3;
}

.biwpc-step-heading:focus {
	outline: 2px solid var(--biwpc-steel);
	outline-offset: 3px;
}

.biwpc-choice {
	margin: 0 0 1.25rem;
	padding: 0.85rem 0.95rem 0.7rem;
	border: 1px solid var(--biwpc-line);
}

.biwpc-choice legend {
	margin-bottom: 0.35rem;
	font-size: 1rem;
	font-weight: 600;
}

.biwpc-radio {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem 0.5rem;
	margin: 0.4rem 0;
}

.biwpc-radio input {
	width: 1.15rem;
	height: 1.15rem;
	margin: 0;
	accent-color: var(--biwpc-steel);
}

.biwpc-radio label {
	flex: 1 1 12rem;
	font-weight: 400;
}

.biwpc-field {
	margin: 0 0 1.35rem;
}

.biwpc-label-line {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem;
	margin-bottom: 0.35rem;
}

.biwpc-field > label,
.biwpc-label-line label {
	font-weight: 600;
}

.biwpc-field > label {
	display: block;
	margin-bottom: 0.35rem;
}

.biwpc input[type="text"],
.biwpc select {
	width: 100%;
	max-width: 100%;
	min-height: 44px;
	padding: 0.55rem 0.7rem;
	border: 1px solid #5c6a7a;
	border-radius: 2px;
	background: var(--biwpc-paper);
	color: var(--biwpc-ink);
	font: inherit;
}

.biwpc-hint,
.biwpc-note {
	margin: 0.4rem 0 0;
	color: var(--biwpc-slate);
	font-size: 0.95rem;
}

.biwpc-note {
	margin-bottom: 0.8rem;
}

.biwpc-error {
	margin: 0.4rem 0 0;
	color: var(--biwpc-error);
	font-weight: 600;
}

.biwpc-warning {
	margin: 0.4rem 0 0;
	padding: 0.45rem 0.65rem;
	background: var(--biwpc-warning-bg);
	color: var(--biwpc-warning);
}

.biwpc-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 0.4rem;
}

.biwpc-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0.55rem 1.15rem;
	border: 2px solid var(--biwpc-steel);
	border-radius: 2px;
	background: var(--biwpc-steel);
	color: #ffffff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
}

.biwpc-button:hover {
	border-color: var(--biwpc-steel-dark);
	background: var(--biwpc-steel-dark);
}

.biwpc-button-ghost {
	background: var(--biwpc-paper);
	color: var(--biwpc-steel);
}

.biwpc-button-ghost:hover {
	background: #e7eef5;
	color: var(--biwpc-steel-dark);
}

.biwpc-next,
.biwpc-download {
	margin-left: auto;
}

.biwpc-tip {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.75rem;
	height: 1.75rem;
	padding: 0;
	border: 1px solid var(--biwpc-steel);
	border-radius: 50%;
	background: var(--biwpc-paper);
	color: var(--biwpc-steel);
	font: inherit;
	font-size: 0.85rem;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	vertical-align: middle;
}

.biwpc-tip:hover,
.biwpc-tip[aria-expanded="true"] {
	background: var(--biwpc-steel);
	color: #ffffff;
}

.biwpc-tip-panel {
	margin: 0.4rem 0 0.75rem;
	padding: 0.7rem 0.8rem;
	border-left: 3px solid var(--biwpc-steel);
	background: var(--biwpc-canvas);
	color: var(--biwpc-ink);
	font-size: 0.95rem;
	line-height: 1.5;
}

.biwpc-tip-panel:not([hidden]) {
	display: block;
}

.biwpc-results {
	margin-top: 2rem;
}

.biwpc-results h2:focus {
	outline: 2px solid var(--biwpc-steel);
	outline-offset: 3px;
}

.biwpc-headline {
	margin: 0 0 0.35rem;
	font-size: 1.25rem;
	line-height: 1.35;
}

.biwpc-headline strong {
	font-size: 1.7rem;
	font-weight: 700;
	letter-spacing: -0.02em;
}

.biwpc-severity {
	margin: 0 0 1.1rem;
	font-weight: 700;
}

.biwpc-severity--low {
	color: #0f5c3a;
}

.biwpc-severity--moderate {
	color: #6a4b00;
}

.biwpc-severity--significant {
	color: #7a3410;
}

.biwpc-severity--severe,
.biwpc-severity--no_payout {
	color: #7f1d1d;
}

.biwpc table {
	width: 100%;
	margin: 0.4rem 0 1.15rem;
	border-collapse: collapse;
	font-size: 0.98rem;
}

.biwpc caption {
	margin: 0 0 0.45rem;
	padding: 0;
	caption-side: top;
	text-align: left;
	font-weight: 700;
}

.biwpc th,
.biwpc td {
	padding: 0.55rem 0.65rem;
	border-bottom: 1px solid var(--biwpc-line);
	vertical-align: top;
}

.biwpc thead th {
	border-bottom: 2px solid var(--biwpc-ink);
	text-align: left;
}

.biwpc thead th:not(:first-child) {
	text-align: right;
}

.biwpc td.biwpc-summary {
	text-align: left;
}

.biwpc td {
	text-align: right;
	font-variant-numeric: tabular-nums;
}

.biwpc th[scope="row"] {
	text-align: left;
	font-weight: 600;
}

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

.biwpc tr.is-selected {
	background: #e7eef5;
}

.biwpc-yours {
	display: inline-block;
	margin-left: 0.35rem;
	padding: 0.05rem 0.4rem;
	border: 1px solid var(--biwpc-steel);
	color: var(--biwpc-steel);
	font-size: 0.8rem;
	font-weight: 700;
	line-height: 1.4;
	vertical-align: middle;
}

.biwpc-table-scroll {
	max-width: 100%;
	margin: 0 0 0.5rem;
	overflow-x: auto;
}

.biwpc-meter {
	margin: 0 0 1.4rem;
}

.biwpc-meter figcaption {
	margin-bottom: 0.35rem;
	font-weight: 600;
}

.biwpc meter {
	width: 100%;
	height: 0.85rem;
}

.biwpc meter::-webkit-meter-bar {
	border: 0;
	border-radius: 2px;
	background: #e6ebf1;
}

.biwpc meter::-webkit-meter-optimum-value {
	background: var(--biwpc-steel);
}

.biwpc-epi {
	margin-top: 0.2rem;
}

.biwpc-checks {
	margin: 0 0 1rem;
	padding-left: 1.2rem;
}

.biwpc-checks li {
	margin: 0.35rem 0;
}

.biwpc-disclaimer {
	margin: 1.4rem 0 1.2rem;
	padding: 0.9rem 1rem;
	border: 2px solid var(--biwpc-ink);
	background: var(--biwpc-paper);
}

.biwpc-disclaimer p {
	margin: 0;
}

.biwpc-pdf-status {
	margin-top: 0.75rem;
	color: var(--biwpc-error);
	font-weight: 600;
}

.biwpc-download {
	margin-top: 0.25rem;
}

.biwpc :focus-visible {
	outline: 2px solid var(--biwpc-ink);
	outline-offset: 2px;
}

.biwpc [hidden] {
	display: none;
}

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

@media (max-width: 40rem) {
	.biwpc {
		margin: 0 0 2rem;
		padding: 1.15rem 0.9rem 2rem;
		border-right: 0;
		border-left: 0;
	}

	.biwpc h1 {
		font-size: 1.65rem;
	}

	.biwpc-headline strong {
		font-size: 1.45rem;
	}

	.biwpc-next,
	.biwpc-download {
		margin-left: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.biwpc *,
	.biwpc *::before,
	.biwpc *::after {
		scroll-behavior: auto;
		transition: none;
	}
}
