.wcc {
	--wcc-accent: #5f7f00;
	--wcc-accent-dark: #486100;
	--wcc-surface: #ffffff;
	--wcc-surface-muted: #f6f7f3;
	--wcc-text: #20251a;
	--wcc-text-muted: #56604d;
	--wcc-border: #cfd5c8;
	--wcc-error: #b42318;
	--wcc-success: #2f6b16;
	max-width: 760px;
	margin: 32px 0;
	padding: clamp(20px, 4vw, 32px);
	color: var(--wcc-text);
	background: var(--wcc-surface);
	border: 1px solid var(--wcc-border);
	border-radius: 12px;
	font: inherit;
}

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

.wcc__title {
	margin: 0 0 8px;
	font-size: clamp(24px, 4vw, 32px);
	line-height: 1.2;
}

.wcc__intro {
	margin: 0 0 24px;
	color: var(--wcc-text-muted);
	font-size: 16px;
	line-height: 1.6;
}

.wcc__dimensions {
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
}

.wcc__field label,
.wcc__methods legend {
	display: block;
	margin: 0 0 8px;
	color: var(--wcc-text);
	font-size: 16px;
	font-weight: 700;
}

.wcc__input-wrap {
	display: flex;
	align-items: center;
	min-height: 48px;
	background: var(--wcc-surface);
	border: 1px solid var(--wcc-border);
	border-radius: 8px;
	transition: border-color 180ms ease, box-shadow 180ms ease;
}

.wcc__input-wrap:focus-within {
	border-color: var(--wcc-accent);
	box-shadow: 0 0 0 3px rgb(95 127 0 / 18%);
}

.wcc__input-wrap:has(input[aria-invalid="true"]) {
	border-color: var(--wcc-error);
}

.wcc__input-wrap input {
	width: 100%;
	min-width: 0;
	min-height: 46px;
	margin: 0;
	padding: 11px 12px;
	color: var(--wcc-text);
	background: transparent;
	border: 0;
	border-radius: 8px;
	font: inherit;
	font-size: 18px;
	font-variant-numeric: tabular-nums;
	outline: 0;
}

.wcc__input-wrap > span {
	padding: 0 14px;
	color: var(--wcc-text-muted);
	font-weight: 700;
}

.wcc__hint,
.wcc__field-error {
	margin: 6px 0 0;
	font-size: 14px;
	line-height: 1.45;
}

.wcc__hint {
	color: var(--wcc-text-muted);
}

.wcc__field-error {
	min-height: 20px;
	color: var(--wcc-error);
}

.wcc__methods {
	display: grid;
	gap: 10px;
	margin: 24px 0;
	padding: 0;
	border: 0;
}

.wcc__method {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	min-height: 64px;
	padding: 14px;
	cursor: pointer;
	background: var(--wcc-surface);
	border: 1px solid var(--wcc-border);
	border-radius: 8px;
	transition: border-color 180ms ease, background-color 180ms ease;
	touch-action: manipulation;
}

.wcc__method:hover,
.wcc__method:has(input:checked) {
	background: var(--wcc-surface-muted);
	border-color: var(--wcc-accent);
}

.wcc__method:focus-within {
	box-shadow: 0 0 0 3px rgb(95 127 0 / 18%);
}

.wcc__method input {
	width: 20px;
	height: 20px;
	margin: 2px 0 0;
	accent-color: var(--wcc-accent);
}

.wcc__method span {
	display: grid;
	gap: 2px;
}

.wcc__method small {
	color: var(--wcc-text-muted);
	font-size: 14px;
	line-height: 1.45;
}

.wcc__result {
	display: grid;
	gap: 10px;
	margin: 24px 0 16px;
	padding: 18px;
	background: var(--wcc-surface-muted);
	border-radius: 8px;
}

.wcc__result > div {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
}

.wcc__result strong {
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.wcc__total-row {
	padding-top: 10px;
	border-top: 1px solid var(--wcc-border);
	font-size: 20px;
}

.wcc__total {
	color: var(--wcc-accent-dark);
	font-size: 24px;
}

.wcc__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	min-height: 50px;
	padding: 12px 20px;
	cursor: pointer;
	color: #ffffff;
	background: var(--wcc-accent);
	border: 2px solid var(--wcc-accent);
	border-radius: 8px;
	font: inherit;
	font-size: 17px;
	font-weight: 700;
	transition: background-color 180ms ease, border-color 180ms ease, opacity 180ms ease;
	touch-action: manipulation;
}

.wcc__button:hover:not(:disabled) {
	background: var(--wcc-accent-dark);
	border-color: var(--wcc-accent-dark);
}

.wcc__button:focus-visible {
	outline: 3px solid rgb(95 127 0 / 35%);
	outline-offset: 3px;
}

.wcc__button:disabled {
	cursor: not-allowed;
	opacity: 0.48;
}

.wcc__spinner {
	display: none;
	width: 18px;
	height: 18px;
	border: 2px solid rgb(255 255 255 / 45%);
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: wcc-spin 700ms linear infinite;
}

.wcc__form.is-loading .wcc__spinner {
	display: block;
}

.wcc__status {
	min-height: 26px;
	margin-top: 12px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.5;
}

.wcc__status.is-error {
	color: var(--wcc-error);
}

.wcc__status.is-success {
	color: var(--wcc-success);
}

.wcc__status a {
	color: inherit;
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 2px;
}

@keyframes wcc-spin {
	to { transform: rotate(360deg); }
}

@media (min-width: 600px) {
	.wcc__dimensions {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

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

@media (prefers-reduced-motion: reduce) {
	.wcc *,
	.wcc *::before,
	.wcc *::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}
}
