/*
 * Kalkulator podatku od spadków — style.
 * Paleta Times Press / iFaktury (niebieski #0d6efd).
 */

.kw-hid {
	--kwhi-accent: #0d6efd;
	--kwhi-accent-hover: #0b5ed7;
	--kwhi-accent-soft: #e7f1ff;
	--kwhi-text: #212529;
	--kwhi-text-muted: #6c757d;
	--kwhi-bg: #fff;
	--kwhi-bg-alt: #f8f9fa;
	--kwhi-border: #dee2e6;
	--kwhi-radius: 6px;
	--kwhi-gap: 12px;

	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 14px;
	line-height: 1.5;
	color: var(--kwhi-text);
	max-width: 720px;
	margin: 0 auto;
	box-sizing: border-box;
}

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

.kw-hid__form {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 20px;
	background: var(--kwhi-bg-alt);
	border-radius: var(--kwhi-radius);
}

.kw-hid__row {
	display: flex;
	flex-wrap: wrap;
	gap: var(--kwhi-gap);
}

.kw-hid__field {
	display: flex;
	flex-direction: column;
	gap: 4px;
	flex: 1 1 200px;
	min-width: 0;
}

.kw-hid__label {
	font-size: 12px;
	color: var(--kwhi-text-muted);
	font-weight: 500;
}

.kw-hid__input,
.kw-hid__select {
	padding: 10px 12px;
	font-family: inherit;
	font-size: 14px;
	border: 1px solid var(--kwhi-border);
	border-radius: var(--kwhi-radius);
	background: var(--kwhi-bg);
	color: var(--kwhi-text);
	min-height: 40px;
	width: 100%;
}

.kw-hid__input:focus,
.kw-hid__select:focus {
	outline: 2px solid var(--kwhi-accent);
	outline-offset: 1px;
	border-color: var(--kwhi-accent);
}

.kw-hid__etat-wrap {
	display: flex;
	align-items: center;
	gap: 6px;
}

.kw-hid__input--etat {
	text-align: center;
	font-weight: 600;
	font-size: 16px;
	flex: 1;
}

.kw-hid__etat-sep {
	font-size: 20px;
	color: var(--kwhi-text-muted);
	font-weight: 700;
}

.kw-hid__checkbox {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 12px 16px;
	background: var(--kwhi-bg);
	border: 1px solid var(--kwhi-border);
	border-radius: var(--kwhi-radius);
	cursor: pointer;
	user-select: none;
}

.kw-hid__checkbox input {
	accent-color: var(--kwhi-accent);
	margin: 2px 0 0 0;
	flex-shrink: 0;
}

.kw-hid__checkbox small {
	color: var(--kwhi-text-muted);
	font-size: 12px;
}

.kw-hid__checkbox:has(input:checked) {
	background: var(--kwhi-accent-soft);
	border-color: var(--kwhi-accent);
}

.kw-hid__actions {
	display: flex;
	justify-content: center;
	margin-top: 8px;
}

.kw-hid__btn {
	padding: 12px 32px;
	font-family: inherit;
	font-size: 15px;
	font-weight: 500;
	background: var(--kwhi-accent);
	color: #fff;
	border: none;
	border-radius: var(--kwhi-radius);
	cursor: pointer;
	min-width: 200px;
	transition: background 0.15s ease;
}

.kw-hid__btn:hover { background: var(--kwhi-accent-hover); }
.kw-hid__btn[disabled] { opacity: 0.6; cursor: not-allowed; }

.kw-hid__error {
	margin-top: 16px;
	padding: 12px 16px;
	background: #fdecea;
	color: #b00020;
	border-radius: var(--kwhi-radius);
	border-left: 3px solid #b00020;
}

.kw-hid__results { margin-top: 20px; }

.kw-hid__summary {
	padding: 24px;
	background: var(--kwhi-accent-soft);
	border-radius: var(--kwhi-radius);
	border: 2px solid var(--kwhi-accent);
	text-align: center;
}

.kw-hid__big-number {
	font-size: 48px;
	font-weight: 700;
	color: var(--kwhi-accent);
	margin: 0;
	font-variant-numeric: tabular-nums;
	line-height: 1.1;
}

.kw-hid__big-unit {
	font-size: 20px;
	color: var(--kwhi-text-muted);
	margin-left: 6px;
	font-weight: 500;
}

.kw-hid__big-label {
	font-size: 13px;
	color: var(--kwhi-text-muted);
	text-transform: uppercase;
	letter-spacing: 1px;
	margin: 4px 0 0;
}

.kw-hid__breakdown {
	margin-top: 16px;
	padding: 20px;
	background: var(--kwhi-bg);
	border: 1px solid var(--kwhi-border);
	border-radius: var(--kwhi-radius);
}

.kw-hid__breakdown-title {
	font-size: 14px;
	font-weight: 600;
	color: var(--kwhi-text);
	margin: 0 0 12px;
}

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

.kw-hid__breakdown-list li {
	padding: 8px 0;
	border-bottom: 1px solid var(--kwhi-border);
	font-size: 13px;
	color: var(--kwhi-text);
}

.kw-hid__breakdown-list li:last-child { border-bottom: none; }

.kw-hid__breakdown-list strong { color: var(--kwhi-accent); }

@media (max-width: 640px) {
	.kw-hid__row { flex-direction: column; }
	.kw-hid__big-number { font-size: 36px; }
}

.kw-hid__field--full { flex: 1 1 100%; }

.kw-hid__amount-wrap { position: relative; }

.kw-hid__amount-wrap .kw-hid__input {
	padding-right: 50px;
	text-align: right;
	font-weight: 600;
	font-size: 16px;
}

.kw-hid__suffix {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--kwhi-text-muted);
	font-size: 13px;
	pointer-events: none;
}

.kw-hid__etat-wrap {
	display: flex;
	align-items: center;
	gap: 6px;
}

.kw-hid__input--etat {
	text-align: center;
	font-weight: 600;
	font-size: 16px;
	flex: 1;
}

.kw-hid__etat-sep {
	font-size: 20px;
	color: var(--kwhi-text-muted);
	font-weight: 700;
}

.kw-hid__checkbox {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 16px;
	background: var(--kwhi-bg);
	border: 1px solid var(--kwhi-border);
	border-radius: var(--kwhi-radius);
	cursor: pointer;
	user-select: none;
}

.kw-hid__checkbox input {
	accent-color: var(--kwhi-accent);
	margin: 0;
	flex-shrink: 0;
}

.kw-hid__checkbox:has(input:checked) {
	background: var(--kwhi-accent-soft);
	border-color: var(--kwhi-accent);
}

.kw-hid__split-info {
	margin-top: 12px;
	padding: 10px 14px;
	background: var(--kwhi-accent-soft);
	border-radius: var(--kwhi-radius);
	font-size: 13px;
	color: var(--kwhi-text);
	border-left: 3px solid var(--kwhi-accent);
}

.kw-hid__variants {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.kw-hid__radio {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 12px 16px;
	background: var(--kwhi-bg);
	border: 1px solid var(--kwhi-border);
	border-radius: var(--kwhi-radius);
	cursor: pointer;
	user-select: none;
}

.kw-hid__radio input {
	accent-color: var(--kwhi-accent);
	margin: 2px 0 0 0;
	flex-shrink: 0;
}

.kw-hid__radio small {
	color: var(--kwhi-text-muted);
	font-size: 12px;
}

.kw-hid__radio:has(input:checked) {
	background: var(--kwhi-accent-soft);
	border-color: var(--kwhi-accent);
}

.kw-hid__benefits-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	margin-top: 16px;
}

.kw-hid__benefit-tile {
	padding: 14px;
	background: var(--kwhi-bg);
	border: 1px solid var(--kwhi-border);
	border-radius: var(--kwhi-radius);
	text-align: center;
}

.kw-hid__benefit-value {
	font-size: 18px;
	font-weight: 700;
	color: var(--kwhi-accent);
	margin: 0 0 4px;
	font-variant-numeric: tabular-nums;
	word-break: break-word;
}

.kw-hid__benefit-label {
	font-size: 11px;
	color: var(--kwhi-text-muted);
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin: 0;
}

.kw-hid__benefit-period {
	font-size: 12px;
	color: var(--kwhi-text-muted);
	margin: 4px 0 0;
}

@media (max-width: 640px) {
	.kw-hid__benefits-grid { grid-template-columns: 1fr; }
}

.kw-hid__checkbox {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 12px 16px;
	background: var(--kwhi-bg);
	border: 1px solid var(--kwhi-border);
	border-radius: var(--kwhi-radius);
	cursor: pointer;
	user-select: none;
}

.kw-hid__checkbox input {
	accent-color: var(--kwhi-accent);
	margin: 2px 0 0 0;
	flex-shrink: 0;
}

.kw-hid__checkbox small {
	color: var(--kwhi-text-muted);
	font-size: 12px;
}

.kw-hid__checkbox:has(input:checked) {
	background: var(--kwhi-accent-soft);
	border-color: var(--kwhi-accent);
}

.kw-hid__hint {
	display: block;
	font-size: 12px;
	color: var(--kwhi-text-muted);
	margin-top: 4px;
}

.kw-hid__tiles {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
	margin-top: 16px;
}

.kw-hid__tile {
	padding: 14px;
	background: var(--kwhi-bg);
	border: 1px solid var(--kwhi-border);
	border-radius: var(--kwhi-radius);
	text-align: center;
}

.kw-hid__tile-value {
	font-size: 18px;
	font-weight: 700;
	color: var(--kwhi-accent);
	margin: 0 0 4px;
	font-variant-numeric: tabular-nums;
	word-break: break-word;
}

.kw-hid__tile-label {
	font-size: 11px;
	color: var(--kwhi-text-muted);
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin: 0;
}

.kw-hid__exempt-banner {
	padding: 16px;
	background: #d1f7e8;
	color: #064e3b;
	border: 1px solid #34d399;
	border-radius: var(--kwhi-radius);
	font-weight: 600;
	text-align: center;
	margin-top: 12px;
}

@media (max-width: 640px) {
	.kw-hid__tiles { grid-template-columns: 1fr; }
}

/* Specific for Utrzymanie: field-row layout */
.kw-hi__field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
@media (max-width: 600px) { .kw-hi__field-row { grid-template-columns: 1fr; } }

/* Categories grid */
.kw-hi__categories { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin: 1rem 0; }
@media (max-width: 700px) { .kw-hi__categories { grid-template-columns: 1fr; } }

.kw-hi__category {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	padding: 0.75rem;
	background: var(--kwhi-input-bg);
	border-radius: var(--kwhi-radius);
	border: 1px solid var(--kwhi-border);
}
.kw-hi__category-label {
	font-size: 0.875rem;
	color: var(--kwhi-text);
	display: flex;
	align-items: center;
	gap: 0.4rem;
}
.kw-hi__category-icon { font-size: 1.1rem; }
.kw-hi__category-help {
	font-size: 0.75rem;
	color: var(--kwhi-muted);
	font-style: italic;
}

/* Breakdown table */
.kw-hi__breakdown-table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 0.75rem;
	font-size: 0.875rem;
}
.kw-hi__breakdown-table th,
.kw-hi__breakdown-table td {
	padding: 0.5rem;
	text-align: left;
	border-bottom: 1px solid var(--kwhi-border);
}
.kw-hi__breakdown-table th {
	background: var(--kwhi-input-bg);
	font-weight: 600;
	color: var(--kwhi-muted);
	font-size: 0.75rem;
	text-transform: uppercase;
}
.kw-hi__breakdown-table td.num { text-align: right; font-variant-numeric: tabular-nums; }

.kw-hi__bar {
	height: 6px;
	background: var(--kwhi-border);
	border-radius: 3px;
	overflow: hidden;
	margin-top: 4px;
}
.kw-hi__bar-fill {
	height: 100%;
	background: linear-gradient(90deg, #0d6efd, #6366f1);
	border-radius: 3px;
}

.kw-hi__assessment {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.75rem 1rem;
	border-radius: var(--kwhi-radius);
	margin-top: 0.75rem;
	font-weight: 500;
}
.kw-hi__assessment--much_lower { background: #ecfdf5; color: #065f46; }
.kw-hi__assessment--lower { background: #d1fae5; color: #065f46; }
.kw-hi__assessment--average { background: #eff6ff; color: #1e40af; }
.kw-hi__assessment--higher { background: #fef3c7; color: #92400e; }
.kw-hi__assessment--much_higher { background: #fee2e2; color: #991b1b; }

/* PESEL structure visualization */
.kw-hi__structure {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 1rem 0;
	padding: 1rem;
	background: var(--kwhi-input-bg);
	border-radius: var(--kwhi-radius);
}
.kw-hi__part {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 0.5rem;
	background: white;
	border-radius: 6px;
	border: 1px solid var(--kwhi-border);
	flex: 1;
	min-width: 60px;
}
.kw-hi__part--year { border-color: #0d6efd; }
.kw-hi__part--month { border-color: #10b981; }
.kw-hi__part--day { border-color: #f59e0b; }
.kw-hi__part--serial { border-color: #8b5cf6; }
.kw-hi__part--control { border-color: #ef4444; }

.kw-hi__part-value {
	font-size: 1.5rem;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	color: var(--kwhi-text);
}
.kw-hi__part-label {
	font-size: 0.7rem;
	color: var(--kwhi-muted);
	text-align: center;
	text-transform: uppercase;
	margin-top: 2px;
}

/* Milestones */
.kw-hi__milestones {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 0.5rem;
	margin-top: 1rem;
}
.kw-hi__milestone {
	padding: 0.75rem;
	background: var(--kwhi-input-bg);
	border-radius: var(--kwhi-radius);
	font-size: 0.875rem;
}
.kw-hi__milestone--passed {
	background: #ecfdf5;
	color: #065f46;
}
.kw-hi__milestone-days {
	font-weight: 700;
}
.kw-hi__milestone-date {
	font-size: 0.75rem;
	color: var(--kwhi-muted);
}

/* Badge */
.kw-hi__badge {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 12px;
	font-size: 0.8rem;
	font-weight: 600;
}
.kw-hi__badge--ok { background: #d1fae5; color: #065f46; }
.kw-hi__badge--info { background: #dbeafe; color: #1e40af; }
.kw-hi__badge--warn { background: #fef3c7; color: #92400e; }
.kw-hi__badge--err { background: #fee2e2; color: #991b1b; }

.kw-hi__gender--female { color: #ec4899; }
.kw-hi__gender--male { color: #3b82f6; }

/* Specific for dni-robocze */
.kw-hi__mode-block { margin-bottom: 1rem; }
.kw-hi__field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 0.75rem; }
@media (max-width: 600px) { .kw-hi__field-row { grid-template-columns: 1fr; } }

.kw-hi__field--checkbox { display: flex; align-items: flex-end; padding-bottom: 0.5rem; }
.kw-hi__checkbox-label { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; font-size: 0.9rem; }

/* Big stat boxes */
.kw-hi__stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 0.75rem;
	margin: 1rem 0;
}
.kw-hi__stat {
	padding: 1rem;
	background: var(--kwhi-input-bg);
	border-radius: var(--kwhi-radius);
	border: 1px solid var(--kwhi-border);
	text-align: center;
}
.kw-hi__stat--primary {
	background: linear-gradient(135deg, #0d6efd, #6366f1);
	color: white;
	border: 0;
}
.kw-hi__stat-value {
	font-size: 2rem;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	line-height: 1;
}
.kw-hi__stat--primary .kw-hi__stat-value { color: white; }
.kw-hi__stat-label {
	font-size: 0.8rem;
	color: var(--kwhi-muted);
	margin-top: 0.25rem;
}
.kw-hi__stat--primary .kw-hi__stat-label { color: rgba(255,255,255,0.85); }

/* Holidays table */
.kw-hi__holidays-table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 0.75rem;
	font-size: 0.875rem;
}
.kw-hi__holidays-table th,
.kw-hi__holidays-table td {
	padding: 0.5rem;
	text-align: left;
	border-bottom: 1px solid var(--kwhi-border);
}
.kw-hi__holidays-table th {
	background: var(--kwhi-input-bg);
	font-weight: 600;
	color: var(--kwhi-muted);
	font-size: 0.75rem;
	text-transform: uppercase;
}
.kw-hi__badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 10px;
	font-size: 0.75rem;
	font-weight: 600;
}
.kw-hi__badge--impact { background: #fee2e2; color: #991b1b; }
.kw-hi__badge--noimpact { background: #e5e7eb; color: #4b5563; }

/* Progress bar */
.kw-hi__progress {
	margin: 1rem 0;
}
.kw-hi__progress-bar {
	height: 24px;
	background: var(--kwhi-input-bg);
	border-radius: 12px;
	overflow: hidden;
	position: relative;
}
.kw-hi__progress-fill {
	height: 100%;
	background: linear-gradient(90deg, #0d6efd, #8b5cf6, #ec4899);
	border-radius: 12px;
	transition: width 0.5s ease;
}
.kw-hi__progress-text {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-weight: 600;
	font-size: 0.875rem;
	color: white;
	text-shadow: 0 0 4px rgba(0,0,0,0.5);
}
.kw-hi__progress-labels {
	display: flex;
	justify-content: space-between;
	margin-top: 0.25rem;
	font-size: 0.75rem;
	color: var(--kwhi-muted);
}

/* Milestones */
.kw-hi__milestones-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.875rem;
}
.kw-hi__milestones-table th,
.kw-hi__milestones-table td {
	padding: 0.5rem;
	text-align: left;
	border-bottom: 1px solid var(--kwhi-border);
}
.kw-hi__milestones-table th {
	background: var(--kwhi-input-bg);
	font-weight: 600;
	color: var(--kwhi-muted);
	font-size: 0.75rem;
	text-transform: uppercase;
}
.kw-hi__milestone-passed {
	background: #ecfdf5;
	color: #065f46;
}

.kw-hi__status-badge {
	display: inline-block;
	padding: 6px 14px;
	border-radius: 14px;
	font-weight: 600;
	font-size: 0.9rem;
	color: white;
}

/* USG dates */
.kw-hi__usg-list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 0.75rem;
	margin-top: 0.75rem;
}
.kw-hi__usg-item {
	padding: 0.75rem;
	background: var(--kwhi-input-bg);
	border-radius: var(--kwhi-radius);
	border-left: 3px solid #0d6efd;
}
.kw-hi__usg-week {
	font-weight: 700;
	color: #0d6efd;
	font-size: 0.875rem;
}
.kw-hi__usg-date {
	font-size: 1.1rem;
	font-weight: 600;
	margin-top: 4px;
}
.kw-hi__usg-name {
	font-size: 0.75rem;
	color: var(--kwhi-muted);
	margin-top: 2px;
}

/* Comparison table */
.kw-hi__comparison-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.875rem;
	margin-top: 0.75rem;
}
.kw-hi__comparison-table th,
.kw-hi__comparison-table td {
	padding: 0.5rem;
	text-align: left;
	border-bottom: 1px solid var(--kwhi-border);
}
.kw-hi__comparison-table th {
	background: var(--kwhi-input-bg);
	font-weight: 600;
	color: var(--kwhi-muted);
	font-size: 0.75rem;
	text-transform: uppercase;
}
.kw-hi__comparison-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.kw-hi__comparison-row--current { background: #eff6ff; font-weight: 600; }

.kw-hi__field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .kw-hi__field-row { grid-template-columns: 1fr; } }

.kw-hi__badge {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 10px;
	font-size: 0.75rem;
	font-weight: 600;
	margin-left: 6px;
}
.kw-hi__badge--minimum { background: #fef3c7; color: #92400e; }
.kw-hi__badge--fixed { background: #dbeafe; color: #1e40af; }

.kw-hi__field--checkbox { display: flex; align-items: center; gap: 0.5rem; }
.kw-hi__checkbox-label { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; font-size: 0.9rem; }

.kw-hi__hero--refund { background: linear-gradient(135deg, #059669, #10b981); color: white; }
.kw-hi__hero--refund .kw-hi__hero-value { color: white; }
.kw-hi__hero--refund .kw-hi__hero-label { color: rgba(255,255,255,0.9); }
.kw-hi__hero--underpayment { background: linear-gradient(135deg, #dc2626, #ef4444); color: white; }
.kw-hi__hero--underpayment .kw-hi__hero-value { color: white; }
.kw-hi__hero--underpayment .kw-hi__hero-label { color: rgba(255,255,255,0.9); }
.kw-hi__hero--balanced { background: linear-gradient(135deg, #6366f1, #0d6efd); color: white; }
.kw-hi__hero--balanced .kw-hi__hero-value { color: white; }
.kw-hi__hero--balanced .kw-hi__hero-label { color: rgba(255,255,255,0.9); }

.kw-hi__steps-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; margin-top: 0.75rem; }
.kw-hi__steps-table th, .kw-hi__steps-table td { padding: 0.5rem; text-align: left; border-bottom: 1px solid var(--kwhi-border); }
.kw-hi__steps-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.kw-hi__steps-table tr.kw-hi__step--final { font-weight: 700; background: var(--kwhi-input-bg); }

.kw-hi__advanced {
	margin: 1rem 0;
	padding: 0.75rem 1rem;
	background: var(--kwhi-input-bg);
	border-radius: var(--kwhi-radius);
}
.kw-hi__advanced summary {
	cursor: pointer;
	font-weight: 600;
	font-size: 0.9rem;
	color: var(--kwhi-muted);
	user-select: none;
}
.kw-hi__advanced[open] summary { margin-bottom: 0.75rem; }

/* Pension result variants */
.kw-hi__hero--below_min { background: linear-gradient(135deg, #dc2626, #ef4444); color: white; }
.kw-hi__hero--below_min .kw-hi__hero-value { color: white; }
.kw-hi__hero--below_min .kw-hi__hero-label { color: rgba(255,255,255,0.9); }
.kw-hi__hero--low { background: linear-gradient(135deg, #f59e0b, #fbbf24); color: white; }
.kw-hi__hero--low .kw-hi__hero-value { color: white; }
.kw-hi__hero--low .kw-hi__hero-label { color: rgba(255,255,255,0.9); }
.kw-hi__hero--medium { background: linear-gradient(135deg, #0d6efd, #6366f1); color: white; }
.kw-hi__hero--medium .kw-hi__hero-value { color: white; }
.kw-hi__hero--medium .kw-hi__hero-label { color: rgba(255,255,255,0.9); }
.kw-hi__hero--good, .kw-hi__hero--excellent { background: linear-gradient(135deg, #059669, #10b981); color: white; }
.kw-hi__hero--good .kw-hi__hero-value, .kw-hi__hero--excellent .kw-hi__hero-value { color: white; }
.kw-hi__hero--good .kw-hi__hero-label, .kw-hi__hero--excellent .kw-hi__hero-label { color: rgba(255,255,255,0.9); }

/* Replacement rate bar */
.kw-hi__replacement {
	margin: 1rem 0;
	padding: 1rem;
	background: var(--kwhi-input-bg);
	border-radius: var(--kwhi-radius);
}
.kw-hi__replacement-title {
	font-size: 0.875rem;
	color: var(--kwhi-muted);
	margin-bottom: 0.5rem;
}
.kw-hi__replacement-bar {
	height: 28px;
	background: #e5e7eb;
	border-radius: 14px;
	overflow: hidden;
	position: relative;
}
.kw-hi__replacement-fill {
	height: 100%;
	background: linear-gradient(90deg, #dc2626, #f59e0b 40%, #10b981);
	border-radius: 14px;
	transition: width 0.5s ease;
}
.kw-hi__replacement-text {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-weight: 700;
	font-size: 0.9rem;
	color: #1f2937;
}

/* BMI category hero variants */
.kw-hi__hero--underweight { background: linear-gradient(135deg, #f59e0b, #fbbf24); color: white; }
.kw-hi__hero--underweight .kw-hi__hero-value { color: white; }
.kw-hi__hero--underweight .kw-hi__hero-label { color: rgba(255,255,255,0.9); }
.kw-hi__hero--normal { background: linear-gradient(135deg, #059669, #10b981); color: white; }
.kw-hi__hero--normal .kw-hi__hero-value { color: white; }
.kw-hi__hero--normal .kw-hi__hero-label { color: rgba(255,255,255,0.9); }
.kw-hi__hero--overweight { background: linear-gradient(135deg, #f59e0b, #ef6c00); color: white; }
.kw-hi__hero--overweight .kw-hi__hero-value { color: white; }
.kw-hi__hero--overweight .kw-hi__hero-label { color: rgba(255,255,255,0.9); }
.kw-hi__hero--obese { background: linear-gradient(135deg, #dc2626, #ef4444); color: white; }
.kw-hi__hero--obese .kw-hi__hero-value { color: white; }
.kw-hi__hero--obese .kw-hi__hero-label { color: rgba(255,255,255,0.9); }

/* Percentile bar - shows where the child is on the spectrum */
.kw-hi__percentile-bar {
	margin: 1rem 0;
	padding: 1rem;
	background: var(--kwhi-input-bg);
	border-radius: var(--kwhi-radius);
}
.kw-hi__bar {
	height: 32px;
	background: linear-gradient(90deg, #f59e0b 0%, #f59e0b 5%, #10b981 5%, #10b981 85%, #f59e0b 85%, #f59e0b 95%, #dc2626 95%, #dc2626 100%);
	border-radius: 16px;
	position: relative;
	margin: 0.5rem 0;
}
.kw-hi__bar-marker {
	position: absolute;
	top: -4px;
	width: 4px;
	height: 40px;
	background: #1f2937;
	border-radius: 2px;
	transition: left 0.5s ease;
}
.kw-hi__bar-marker::after {
	content: '';
	position: absolute;
	top: -8px;
	left: -4px;
	width: 12px;
	height: 12px;
	background: #1f2937;
	border-radius: 50%;
}
.kw-hi__bar-labels {
	display: flex;
	justify-content: space-between;
	margin-top: 0.5rem;
	font-size: 0.7rem;
	color: var(--kwhi-muted);
}

/* Percentiles reference table */
.kw-hi__ref-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.875rem;
	margin-top: 0.75rem;
}
.kw-hi__ref-table th,
.kw-hi__ref-table td {
	padding: 0.5rem;
	text-align: left;
	border-bottom: 1px solid var(--kwhi-border);
}
.kw-hi__ref-table td.num { text-align: right; font-variant-numeric: tabular-nums; }

.kw-hi__advice {
	margin-top: 1rem;
	padding: 0.75rem;
	background: #f0f9ff;
	border-left: 4px solid #0d6efd;
	border-radius: 4px;
	font-size: 0.9rem;
}

.kw-hi__field--checkbox { display: flex; flex-direction: column; gap: 0.5rem; padding: 0.75rem; background: var(--kwhi-input-bg); border-radius: var(--kwhi-radius); }
.kw-hi__checkbox-label { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; font-size: 0.9rem; }

.kw-hi__schedule-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; margin-top: 0.75rem; }
.kw-hi__schedule-table th, .kw-hi__schedule-table td { padding: 0.5rem; text-align: left; border-bottom: 1px solid var(--kwhi-border); }
.kw-hi__schedule-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.kw-hi__schedule-table th { background: var(--kwhi-input-bg); font-weight: 600; color: var(--kwhi-muted); font-size: 0.75rem; text-transform: uppercase; }
.kw-hi__schedule-table tr.kw-hi__method-linear td.method-cell { color: #0d6efd; font-weight: 600; }
.kw-hi__schedule-table tr.kw-hi__method-degressive td.method-cell { color: #f59e0b; font-weight: 600; }

.kw-hi__continuation { margin: 1rem 0; padding: 0.75rem; background: #fef3c7; border-left: 4px solid #f59e0b; border-radius: 4px; font-size: 0.875rem; }

.kw-hi__rates-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; margin-top: 0.75rem; }
.kw-hi__rates-table th, .kw-hi__rates-table td { padding: 0.6rem 0.5rem; text-align: left; border-bottom: 1px solid var(--kwhi-border); }
.kw-hi__rates-table td.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.kw-hi__rates-table tr.kw-hi__rate-main td { background: #eff6ff; font-weight: 600; }
.kw-hi__rate-value-big { font-size: 1.1rem; color: #0d6efd; }

.kw-hi__history-change--up { color: #dc2626; font-weight: 600; }
.kw-hi__history-change--down { color: #059669; font-weight: 600; }

.kw-hi__advanced { margin: 1rem 0; padding: 0.75rem 1rem; background: var(--kwhi-input-bg); border-radius: var(--kwhi-radius); }
.kw-hi__advanced summary { cursor: pointer; font-weight: 600; font-size: 0.9rem; color: var(--kwhi-muted); user-select: none; }
.kw-hi__advanced[open] summary { margin-bottom: 0.75rem; }
.kw-hi__field--checkbox { display: flex; flex-direction: column; gap: 0.5rem; }
.kw-hi__checkbox-label { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; font-size: 0.9rem; }

.kw-hi__hero--eligible { background: linear-gradient(135deg, #059669, #10b981); color: white; }
.kw-hi__hero--eligible .kw-hi__hero-value { color: white; }
.kw-hi__hero--eligible .kw-hi__hero-label { color: rgba(255,255,255,0.9); }
.kw-hi__hero--not-eligible { background: linear-gradient(135deg, #dc2626, #ef4444); color: white; }
.kw-hi__hero--not-eligible .kw-hi__hero-value { color: white; }
.kw-hi__hero--not-eligible .kw-hi__hero-label { color: rgba(255,255,255,0.9); }

.kw-hi__issues { margin: 0.75rem 0; padding: 0.75rem; background: #fee2e2; border-left: 4px solid #dc2626; border-radius: 4px; font-size: 0.875rem; }
.kw-hi__issues ul { margin: 0; padding-left: 1.25rem; }

.kw-hi__field--checkbox { display: flex; flex-direction: column; gap: 0.5rem; padding: 0.75rem; background: var(--kwhi-input-bg); border-radius: var(--kwhi-radius); }
.kw-hi__checkbox-label { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; font-size: 0.9rem; }

.kw-hi__savings-badge {
	display: inline-block; padding: 0.25rem 0.75rem; border-radius: 12px;
	background: #d1fae5; color: #065f46; font-size: 0.8rem; font-weight: 600; margin-top: 0.5rem;
}

.kw-hi__hero--very_high_sensitivity, .kw-hi__hero--normal { background: linear-gradient(135deg, #059669, #10b981); color: white; }
.kw-hi__hero--very_high_sensitivity .kw-hi__hero-value, .kw-hi__hero--normal .kw-hi__hero-value { color: white; }
.kw-hi__hero--very_high_sensitivity .kw-hi__hero-label, .kw-hi__hero--normal .kw-hi__hero-label { color: rgba(255,255,255,0.9); }
.kw-hi__hero--borderline { background: linear-gradient(135deg, #f59e0b, #fbbf24); color: white; }
.kw-hi__hero--borderline .kw-hi__hero-value { color: white; }
.kw-hi__hero--borderline .kw-hi__hero-label { color: rgba(255,255,255,0.9); }
.kw-hi__hero--significant { background: linear-gradient(135deg, #ea580c, #f97316); color: white; }
.kw-hi__hero--significant .kw-hi__hero-value { color: white; }
.kw-hi__hero--significant .kw-hi__hero-label { color: rgba(255,255,255,0.9); }
.kw-hi__hero--severe { background: linear-gradient(135deg, #dc2626, #ef4444); color: white; }
.kw-hi__hero--severe .kw-hi__hero-value { color: white; }
.kw-hi__hero--severe .kw-hi__hero-label { color: rgba(255,255,255,0.9); }

.kw-hi__advice { margin-top: 1rem; padding: 0.75rem; background: #f0f9ff; border-left: 4px solid #0d6efd; border-radius: 4px; font-size: 0.9rem; }

.kw-hi__status-row {
	display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0;
}
.kw-hi__status-pill {
	padding: 0.5rem 0.75rem; border-radius: 8px; font-size: 0.85rem;
	display: flex; flex-direction: column; gap: 0.25rem;
}
.kw-hi__status-pill-label { font-size: 0.7rem; color: var(--kwhi-muted); text-transform: uppercase; }
