.hypotheekcalculator {
    --hc-bg: #f3f6fb;
    --hc-panel: #ffffff;
    --hc-panel-strong: #ffffff;
    --hc-border: rgba(148, 163, 184, 0.24);
    --hc-border-strong: rgba(37, 99, 235, 0.18);
    --hc-text: #0f172a;
    --hc-text-soft: #475569;
    --hc-text-muted: #64748b;
    --hc-accent: #1d4ed8;
    --hc-accent-strong: #0f3ea8;
    --hc-accent-soft: #eff6ff;
    --hc-highlight: #f97316;
    --hc-shadow: 0 24px 60px rgba(15, 23, 42, 0.10);
    position: relative;
    overflow: hidden;
    padding: 48px 20px;
    background: #ffffff;
    font-family: "Manrope", "Segoe UI", sans-serif;
}

.calculator-container {
    position: relative;
    z-index: 1;
    max-width: 1220px;
    margin: 0 auto;
    container-type: inline-size;
}

.calculator-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 28px;
    align-items: start;
    justify-content: center;
}

.calculator-layout > * {
    min-width: 0;
}

.calculator-form-section,
.calculator-results-section {
    width: 100%;
    min-width: 0;
    background: var(--hc-panel);
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: 28px;
    padding: 28px;
    box-shadow: var(--hc-shadow);
    box-sizing: border-box;
}

.calculator-results-section {
    position: sticky;
    top: 24px;
}

.calculator-form-section {
    max-width: 470px;
}

.calculator-form-section h2,
.calculator-results-section h2 {
    margin-top: 0;
    margin-bottom: 22px;
    color: var(--hc-text);
    font-size: clamp(1.75rem, 2vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    text-align: center;
}

.details-section h3 {
    margin-top: 0;
    margin-bottom: 16px;
    color: var(--hc-text);
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.calculator-form {
    display: grid;
    gap: 18px;
    min-width: 0;
}

.form-section-block,
.mode-group,
.shared-group {
    display: grid;
    gap: 16px;
    min-width: 0;
}

.form-section-block {
    padding: 20px;
    border: 1px solid var(--hc-border);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: none;
}

.form-section-block.collapsible-section,
.details-section.collapsible-section {
    display: block;
    padding: 0;
}

.mode-max-mortgage,
.mode-monthly-costs {
    background: #ffffff;
    border-color: rgba(148, 163, 184, 0.2);
}

.group-heading,
.collapsible-section-summary-copy,
.collapsible-section-summary-text,
.details-section-heading,
.result-period-pane-heading {
    display: grid;
    gap: 6px;
}

.group-heading,
.collapsible-section-summary-copy,
.collapsible-section-summary-text {
    min-width: 0;
}

.group-heading {
    padding-bottom: 4px;
}

.collapsible-section-summary {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px;
    cursor: pointer;
    list-style: none;
}

.details-section.collapsible-section .collapsible-section-summary {
    padding: 18px;
}

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

.collapsible-section-summary:focus,
.example-inline-button:focus-visible,
.mode-tab:focus,
.result-period-tab:focus,
.help-tooltip-button:focus-visible,
.income-calculator-trigger:focus,
.mortgage-type-option:has(input:focus-visible) {
    outline: none;
}

.collapsible-section-summary-text h3,
.collapsible-section-summary .details-section-heading h3,
.group-heading h3 {
    margin: 0;
    color: var(--hc-text);
    font-size: 1.22rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    overflow-wrap: anywhere;
}

.collapsible-section-summary-text p,
.collapsible-section-summary .details-section-heading p,
.group-heading p {
    margin: 0;
    color: var(--hc-text-muted);
    font-size: 14px;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.collapsible-section-summary .details-section-heading {
    margin-bottom: 0;
}

.collapsible-section-chevron,
.help-tooltip-button,
.income-calculator-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.collapsible-section-chevron {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    color: var(--hc-text-soft);
}

.collapsible-section-chevron::before {
    content: "";
    width: 10px;
    height: 10px;
    margin-top: -3px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.2s ease, margin-top 0.2s ease;
}

.collapsible-section[open] .collapsible-section-chevron::before {
    margin-top: 3px;
    transform: rotate(-135deg);
}

.collapsible-section-body {
    display: grid;
    gap: 16px;
    padding: 0 20px 20px;
}

.details-section.collapsible-section .collapsible-section-body {
    padding: 0 18px 18px;
}

.group-eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.06);
    color: var(--hc-text-soft);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.mode-max-mortgage .group-eyebrow {
    background: rgba(29, 78, 216, 0.10);
    color: var(--hc-accent-strong);
}

.mode-monthly-costs .group-eyebrow {
    background: rgba(249, 115, 22, 0.12);
    color: #c2410c;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field-label-row,
.input-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.field-label-row {
    gap: 10px;
}

.input-label-row {
    gap: 12px;
}

.input-label-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.input-control-row {
    display: flex;
    align-items: stretch;
    gap: 10px;
}

.input-control-row input {
    flex: 1 1 auto;
    min-width: 0;
}

.form-group label,
.form-group legend,
.mode-tabs-label {
    color: var(--hc-text);
    font-weight: 700;
}

.mode-tabs,
.result-period-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    background: rgba(226, 232, 240, 0.42);
    border: 1px solid var(--hc-border);
}

.mode-tabs {
    padding: 7px;
    border-radius: 18px;
}

.mode-tab,
.result-period-tab {
    border: 0;
    background: transparent;
    color: var(--hc-text-soft);
    font-weight: 800;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.mode-tab {
    padding: 13px 16px;
    border-radius: 13px;
    font-size: 15px;
}

.result-period-tab {
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 14px;
}

.mode-tab:hover,
.result-period-tab:hover,
.calculate-button:hover,
.secondary-button:hover,
.help-tooltip-button:hover,
.income-calculator-trigger:hover {
    transform: translateY(-1px);
}

.mode-tab:hover,
.result-period-tab:hover {
    color: var(--hc-text);
}

.mode-tab.is-active,
.result-period-tab.is-active {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    color: var(--hc-text);
}

.mode-tab.is-active {
    box-shadow: 0 14px 26px rgba(15, 23, 42, 0.10);
}

.mode-tab:focus,
.result-period-tab:focus {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}

.form-group legend {
    padding: 0;
}

.fieldset-legend {
    margin-bottom: 2px;
}

.form-group input,
.form-group select {
    width: 100%;
    box-sizing: border-box;
    padding: 13px 15px;
    border: 1px solid rgba(148, 163, 184, 0.42);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--hc-text);
    font-size: 16px;
    line-height: 1.2;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.form-group input::placeholder,
.form-group select::placeholder {
    color: #94a3b8;
}

.form-group input:hover,
.form-group select:hover {
    border-color: rgba(100, 116, 139, 0.5);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.18);
}

.calculate-button,
.secondary-button {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.example-inline-note {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: -8px 2px 10px;
    color: var(--hc-text-muted);
    font-size: 13px;
    line-height: 1.45;
}

.example-inline-note span {
    overflow-wrap: anywhere;
}

.example-inline-button {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--hc-accent-strong);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
    flex-shrink: 0;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.example-inline-button:hover {
    color: var(--hc-accent);
    opacity: 0.92;
}

.example-inline-button:focus-visible {
    border-radius: 6px;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}

.calculate-button {
    width: 100%;
    padding: 15px 18px;
    border: 0;
    background: linear-gradient(135deg, var(--hc-accent) 0%, #3b82f6 100%);
    color: #ffffff;
    box-shadow: 0 18px 30px rgba(29, 78, 216, 0.24);
}

.secondary-button {
    padding: 12px 16px;
    border: 1px solid rgba(59, 130, 246, 0.18);
    background: linear-gradient(180deg, #ffffff 0%, #eff6ff 100%);
    color: var(--hc-accent-strong);
}

.calculate-button:hover {
    box-shadow: 0 22px 32px rgba(29, 78, 216, 0.28);
}

.secondary-button:hover {
    box-shadow: 0 14px 22px rgba(59, 130, 246, 0.12);
}

.secondary-button-muted {
    border-color: rgba(148, 163, 184, 0.26);
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    color: var(--hc-text);
}

.secondary-button-muted:hover {
    box-shadow: 0 14px 22px rgba(15, 23, 42, 0.08);
}

.results-mode-title {
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid var(--hc-border);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.88) 0%, rgba(255, 255, 255, 0.98) 100%);
    text-align: center;
    font-weight: 800;
    color: var(--hc-text);
    overflow-wrap: anywhere;
}

.results-placeholder {
    padding: 28px 20px;
    border: 1px dashed rgba(148, 163, 184, 0.55);
    border-radius: 20px;
    background: rgba(248, 250, 252, 0.72);
    text-align: center;
    color: var(--hc-text-soft);
    line-height: 1.6;
}

.results-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
    min-width: 0;
}

.result-card,
.result-period-pane-section,
.comparison-card {
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.result-card {
    min-height: 108px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 14px;
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.05);
    text-align: left;
    min-width: 0;
    overflow: visible;
}

.result-card strong {
    display: block;
    color: var(--hc-text);
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.1;
    word-break: break-word;
}

.result-card-note {
    display: block;
    margin-top: 10px;
    color: var(--hc-text-soft);
    font-size: 13px;
    line-height: 1.45;
}

.result-card-primary {
    grid-column: span 2;
    min-height: 136px;
    border-color: var(--hc-border-strong);
    background: #ffffff;
}

.result-card-primary strong {
    font-size: clamp(1.75rem, 2.4vw, 2.2rem);
}

.result-card-primary .result-label {
    color: var(--hc-accent-strong);
}

.result-label {
    display: block;
    margin-bottom: 10px;
    color: var(--hc-text-soft);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

.result-label-group {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 10px;
}

.result-label-group .result-label {
    margin-bottom: 0;
}

.general-error {
    margin-bottom: 16px;
    padding: 14px 16px;
    border: 1px solid rgba(239, 68, 68, 0.18);
    border-radius: 14px;
    background: #fee2e2;
    color: #b91c1c;
}

.field-error {
    min-height: 18px;
    color: #b91c1c;
    font-size: 14px;
}

.field-error:not(:empty) {
    font-weight: 600;
}

.form-help {
    color: var(--hc-text-muted);
    font-size: 13px;
    line-height: 1.5;
}

.form-group input.is-invalid,
.form-group select.is-invalid,
.mortgage-type-options.is-invalid {
    border-color: rgba(239, 68, 68, 0.72);
    background: rgba(254, 242, 242, 0.96);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.live-feedback-status {
    min-height: 22px;
    color: var(--hc-text-soft);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
}

.live-feedback-status.is-pending {
    color: var(--hc-accent-strong);
}

.live-feedback-status.is-error {
    color: #b91c1c;
}

.live-feedback-status.is-success {
    color: #166534;
}

.help-tooltip {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
    --hc-help-size: 24px;
    --hc-tooltip-offset-x: 0px;
}

.help-tooltip-button {
    width: var(--hc-help-size);
    height: var(--hc-help-size);
    padding: 0;
    border: 1px solid rgba(96, 165, 250, 0.34);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(239, 246, 255, 0.98) 100%);
    box-shadow: 0 8px 14px rgba(59, 130, 246, 0.08);
    color: var(--hc-accent-strong);
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 800;
    line-height: 1;
    user-select: none;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.help-tooltip-button:hover {
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 12px 22px rgba(59, 130, 246, 0.14);
}

.help-tooltip-button:focus-visible,
.help-tooltip.is-open .help-tooltip-button {
    border-color: rgba(37, 99, 235, 0.6);
    box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.12);
}

.help-tooltip-panel {
    display: block;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 6;
    width: min(280px, calc(100vw - 48px));
    padding: 13px 15px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.96);
    box-shadow: 0 20px 34px rgba(15, 23, 42, 0.22);
    color: #f8fafc;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.55;
    transform: translateX(var(--hc-tooltip-offset-x));
}

.help-tooltip-panel[hidden] {
    display: none;
}

.help-tooltip.is-result .help-tooltip-panel {
    right: 0;
    left: auto;
}

.option-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    max-width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.86);
    color: #334155;
    font-size: 14px;
    font-weight: 600;
    white-space: normal;
}

.option-toggle input {
    width: auto;
    margin: 0;
}

.details-section {
    padding: 18px;
    border: 1px solid var(--hc-border);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.72);
    min-width: 0;
}

.details-section-monthly + .details-section-monthly {
    margin-top: 24px;
}

.details-section-heading {
    margin-bottom: 16px;
}

.details-section-heading p,
.result-period-pane-heading p {
    margin: 0;
    color: var(--hc-text-muted);
    font-size: 14px;
    line-height: 1.55;
}

.result-period-tabs {
    padding: 6px;
    border-radius: 16px;
}

.result-period-tab.is-active {
    box-shadow: 0 12px 20px rgba(15, 23, 42, 0.08);
}

.collapsible-section-body,
.result-period-panel {
    display: grid;
    gap: 16px;
}

.result-period-panel {
    margin-top: 18px;
}

.result-period-panel[hidden] {
    display: none !important;
}

.result-period-pane-section {
    display: grid;
    gap: 14px;
    padding: 16px;
}

.result-period-pane-heading h4,
.comparison-card-header h4 {
    margin: 0;
    color: var(--hc-text);
    font-size: 1rem;
    font-weight: 800;
}

.result-period-pane-heading h4 {
    letter-spacing: -0.02em;
}

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
}

.chart-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--hc-text-soft);
    font-size: 13px;
    font-weight: 700;
}

.chart-legend-swatch {
    width: 12px;
    height: 12px;
    border-radius: 999px;
}

.chart-legend-swatch-interest,
.year-chart-segment-interest {
    background: linear-gradient(180deg, #f97316 0%, #fb923c 100%);
}

.chart-legend-swatch-aflossing,
.year-chart-segment-aflossing {
    background: linear-gradient(180deg, #1d4ed8 0%, #60a5fa 100%);
}

.result-year-chart {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(64px, 1fr);
    gap: 12px;
    align-items: end;
    min-height: 280px;
    padding: 10px 2px 2px;
    overflow-x: auto;
}

.year-chart-column {
    display: grid;
    gap: 10px;
    align-items: end;
}

.year-chart-value,
.year-chart-label {
    text-align: center;
    color: var(--hc-text-soft);
    font-size: 12px;
    font-weight: 700;
}

.year-chart-value {
    min-height: 30px;
}

.year-chart-bar-shell {
    position: relative;
    height: 200px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 10px;
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(248, 250, 252, 0.78) 0%, rgba(226, 232, 240, 0.48) 100%);
}

.year-chart-bar-fill {
    width: min(52px, 100%);
    display: flex;
    flex-direction: column-reverse;
    justify-content: flex-start;
    border-radius: 14px 14px 8px 8px;
    overflow: hidden;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
}

.year-chart-segment {
    display: block;
    width: 100%;
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}

.comparison-card {
    padding: 18px;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
}

.comparison-card.is-selected {
    border-color: rgba(37, 99, 235, 0.32);
    background:
        radial-gradient(circle at top right, rgba(29, 78, 216, 0.12), transparent 40%),
        linear-gradient(180deg, #eff6ff 0%, #ffffff 100%);
}

.comparison-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.comparison-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(29, 78, 216, 0.1);
    color: var(--hc-accent-strong);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.comparison-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
}

.comparison-metrics div {
    min-width: 0;
}

.comparison-metrics dt {
    margin: 0 0 4px;
    color: var(--hc-text-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.comparison-metrics dd {
    margin: 0;
    color: var(--hc-text);
    font-size: 1rem;
    font-weight: 800;
    word-break: break-word;
}

.table-wrapper {
    overflow-x: auto;
    max-width: 100%;
    border-radius: 16px;
}

.result-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    background: #ffffff;
}

.result-table th,
.result-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
}

.result-table th {
    color: var(--hc-text-soft);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: #f8fafc;
}

.income-calculator-trigger {
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #eff6ff 100%);
    color: var(--hc-accent-strong);
    cursor: pointer;
    font-size: 15px;
    font-weight: 800;
    line-height: 1;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.input-control-row .income-calculator-trigger {
    width: 54px;
    min-width: 54px;
    height: auto;
    min-height: 50px;
    border-radius: 14px;
    flex: 0 0 54px;
}

.income-calculator-trigger:hover {
    border-color: rgba(59, 130, 246, 0.42);
    box-shadow: 0 12px 18px rgba(59, 130, 246, 0.12);
}

.income-calculator-trigger:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
}

.income-helper-modal[hidden] {
    display: none;
}

.income-helper-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
}

.income-helper-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(4px);
}

.income-helper-dialog {
    position: relative;
    z-index: 1;
    width: min(560px, calc(100vw - 32px));
    margin: 72px auto;
    display: grid;
    gap: 16px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.20);
}

.income-helper-header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.income-helper-header h3 {
    margin: 0;
    color: var(--hc-text);
    font-size: 20px;
    font-weight: 800;
}

.income-helper-copy {
    margin: 0;
    color: var(--hc-text-soft);
    font-size: 14px;
}

.income-helper-close {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #334155;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
}

.income-helper-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.income-helper-grid-full {
    grid-column: 1 / -1;
}

.income-helper-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.mortgage-type-group {
    margin: 0;
    padding: 0;
    border: 0;
}

.mortgage-type-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3px;
    padding: 3px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 14px;
    background: #f1f5f9;
    box-shadow: none;
    min-width: 0;
}

.mortgage-type-option {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 6px 10px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
    min-width: 0;
}

.mortgage-type-option:hover {
    border-color: transparent;
    background: rgba(255, 255, 255, 0.72);
}

.mortgage-type-option input {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
}

.mortgage-type-option > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 100%;
    color: var(--hc-text-soft);
    font-size: clamp(0.88rem, 0.98vw, 0.96rem);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.mortgage-type-option > span::before {
    content: none;
}

.mortgage-type-option:has(input:focus-visible) {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.mortgage-type-option:has(input:checked),
.mortgage-type-option.is-selected {
    border-color: rgba(148, 163, 184, 0.08);
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), inset 0 0 0 1px rgba(191, 219, 254, 0.34);
}

.mortgage-type-option:has(input:checked) > span,
.mortgage-type-option.is-selected > span {
    color: var(--hc-text);
}

@media (max-width: 1100px) {
    .calculator-layout {
        grid-template-columns: 1fr;
    }

    .calculator-results-section {
        position: static;
    }
}

@container (max-width: 920px) {
    .calculator-layout {
        grid-template-columns: 1fr;
    }

    .calculator-form-section,
    .calculator-results-section {
        max-width: 100%;
    }

    .calculator-results-section {
        position: static;
    }
}

@container (max-width: 620px) {
    .calculator-form-section,
    .calculator-results-section {
        padding: 20px;
        border-radius: 22px;
    }

    .form-section-block {
        padding: 16px;
    }

    .result-card-primary {
        grid-column: auto;
    }

    .example-inline-note {
        align-items: start;
        flex-direction: column;
    }

    .collapsible-section-summary,
    .details-section.collapsible-section .collapsible-section-summary {
        padding: 16px;
    }

    .collapsible-section-body,
    .details-section.collapsible-section .collapsible-section-body {
        padding: 0 16px 16px;
    }

    .mode-tabs,
    .result-period-tabs {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .hypotheekcalculator {
        padding: 32px 14px;
    }

    .calculator-form-section,
    .calculator-results-section {
        padding: 20px;
        border-radius: 22px;
    }

    .results-cards {
        grid-template-columns: 1fr;
    }

    .result-card-primary {
        grid-column: auto;
    }

    .result-table {
        min-width: 640px;
    }

    .income-helper-dialog {
        width: calc(100vw - 24px);
        margin: 24px auto;
    }

    .income-helper-grid,
    .mortgage-type-options {
        grid-template-columns: 1fr;
    }

    .comparison-metrics {
        grid-template-columns: 1fr;
    }

    .example-inline-note {
        align-items: start;
        flex-direction: column;
    }

    .mode-tabs,
    .result-period-tabs {
        grid-template-columns: 1fr;
    }
}
