:root {
    color-scheme: light;
    --primary: #3157d5;
    --primary-strong: #2444b3;
    --primary-soft: #eef2ff;
    --surface: #fff;
    --surface-soft: #f7f8fb;
    --surface-muted: #f1f3f8;
    --text: #111827;
    --text-secondary: #4b5563;
    --text-muted: #6b7280;
    --border: #dfe3eb;
    --danger: #b42318;
    --danger-soft: #fff1f0;
    --warning: #8a4b08;
    --warning-soft: #fff8e7;
    --success: #17633a;
    --success-soft: #edf9f2;
    --shadow: 0 24px 70px rgba(28, 38, 61, 0.1), 0 2px 8px rgba(28, 38, 61, 0.04);
    --radius-sm: 12px;
    --radius-md: 18px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --transition: 210ms var(--ease);
}
*,
:after,
:before {
    box-sizing: border-box;
}
html {
    background: var(--surface-soft);
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}
body,
html {
    min-width: 320px;
}
body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at 50% -160px, rgba(49, 87, 213, 0.1), transparent 360px), var(--surface-soft);
    color: var(--text);
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        Segoe UI,
        Inter,
        Roboto,
        Helvetica,
        Arial,
        sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
button,
input {
    font: inherit;
}
button,
label {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
button {
    color: inherit;
}
[hidden] {
    display: none !important;
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.app {
    width: min(100%, 660px);
    margin: 0 auto;
    padding: max(14px, env(safe-area-inset-top)) 10px max(30px, env(safe-area-inset-bottom));
}
.result,
.wizard {
    width: 100%;
    border: 1px solid rgba(213, 218, 229, 0.88);
    background: hsla(0, 0%, 100%, 0.96);
    backdrop-filter: blur(18px);
}
.wizard {
    max-width: 540px;
    margin: 0 auto;
    padding: clamp(18px, 4vw, 28px);
    transition:
        opacity var(--transition),
        transform var(--transition);
}
.wizard.is-exiting {
    opacity: 0;
    transform: translateY(-8px) scale(0.99);
}
.intro {
    display: grid;
    grid-template-rows: 1fr;
    text-align: center;
    transform: translateY(0);
    transition:
        grid-template-rows var(--transition),
        max-height var(--transition),
        margin var(--transition),
        opacity 0.15s ease,
        transform var(--transition);
}
.intro > * {
    min-height: 0;
}
.app.has-started .intro {
    grid-template-rows: 0fr;
}
.intro h1 {
    margin: 0;
    font-size: clamp(1.5rem, 5.8vw, 2.05rem);
    line-height: 1.12;
    text-wrap: balance;
}
.stage {
    position: relative;
    overflow: hidden;
    transition: height var(--transition);
}
.step {
    display: none;
}
.step.is-active {
    display: block;
    animation: step-in 0.24s var(--ease) both;
}
.step.is-entering-back {
    animation-name: step-in-back;
}
.step__content {
    width: min(100%, 450px);
    margin: 0 auto;
}
.step h2,
fieldset legend {
    display: block;
    width: 100%;
    margin: 0 0 18px;
    padding: 0;
    color: var(--text);
    font-size: clamp(1.3rem, 4.8vw, 1.76rem);
    line-height: 1.16;
    letter-spacing: -0.032em;
    text-wrap: balance;
}
fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}
.numeric-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
}
.field-group {
    min-width: 0;
}
.input-shell {
    display: inline-flex;
    align-items: baseline;
    width: fit-content;
    border: 1.5px solid var(--border-strong);
    border-radius: 15px;
    background: var(--surface);
    transition:
        border-color var(--transition),
        box-shadow var(--transition),
        background var(--transition);
}
.input-shell:focus-within {
    box-shadow: 0 0 0 4px rgba(49, 87, 213, 0.12);
}
.input-shell.has-error {
    border-color: var(--danger);
    background: var(--danger-soft);
}
.number-input {
    width: 4ch;
    max-width: 10ch;
    padding: 10px 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font-size: 1.72rem;
    line-height: 1;
    letter-spacing: -0.025em;
    caret-color: var(--primary);
    font-variant-numeric: tabular-nums;
}
.number-input::placeholder {
    color: #a1a8b5;
    opacity: 1;
}
#rateShell {
    gap: 5px;
    padding-right: 14px;
}
.input-suffix {
    color: var(--text-muted);
    font-size: 0.98rem;
    white-space: nowrap;
}
.field-message,
.field-warning {
    max-width: 310px;
    margin: 7px 2px 0;
    font-size: 0.82rem;
    line-height: 1.35;
}
.field-message {
    min-height: 1.1em;
    color: var(--danger);
}
.field-warning {
    display: none;
    color: var(--warning);
    background: var(--warning-soft);
    padding: 8px 10px;
    border-radius: 10px;
}
.field-warning.is-visible {
    display: block;
    animation: fade-in 0.17s ease both;
}
.button {
    min-height: 48px;
    padding: 0 18px;
    border: 1px solid transparent;
    cursor: pointer;
    transition:
        transform 0.13s ease,
        background var(--transition),
        border-color var(--transition),
        box-shadow var(--transition),
        opacity var(--transition);
}
.button:not(:disabled):active {
    transform: scale(0.98);
}
.button:disabled {
    cursor: not-allowed;
    opacity: 0.42;
}
.button--primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 8px 18px rgba(49, 87, 213, 0.2);
}
.button--primary:not(:disabled):hover {
    background: var(--primary-strong);
    box-shadow: 0 10px 22px rgba(49, 87, 213, 0.26);
}
.button--secondary {
    border-color: var(--border-strong);
    background: var(--surface);
}
.button--secondary:hover {
    background: var(--surface-muted);
}
.button--small {
    min-height: 40px;
    padding-inline: 15px;
    border-radius: 12px;
    font-size: 0.91rem;
}
.button--full {
    width: 100%;
}
.back-link,
.info-link,
.text-action {
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}
.back-link {
    margin-top: 18px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
}
.back-link:hover,
.info-link:hover,
.text-action:hover {
    color: var(--primary);
}
.choice-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 42px;
    margin-top: 14px;
}
.choice-navigation .back-link {
    margin-top: 0;
}
.choice-list {
    display: grid;
    gap: 9px;
}
.choice-list--after-text {
    margin-top: 15px;
}
.choice-card {
    position: relative;
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    align-items: flex-start;
    gap: 11px;
    min-height: 54px;
    padding: 13px 14px;
    border: 1.5px solid var(--border);
    background: var(--surface);
    cursor: pointer;
    transition:
        transform 0.15s var(--ease),
        border-color var(--transition),
        background var(--transition),
        box-shadow var(--transition);
}
.choice-card:hover {
    border-color: #7890df;
    background: #f0f4ff;
    box-shadow: 0 10px 24px rgba(49, 87, 213, 0.14);
}
.choice-card:has(input:checked) {
    border-color: var(--primary);
    background: #e3eaff;
    box-shadow:
        0 0 0 3px rgba(49, 87, 213, 0.1),
        0 8px 18px rgba(49, 87, 213, 0.1);
}
.choice-card:has(input:checked):hover {
    border-color: var(--primary-strong);
    background: #dce5ff;
}
.choice-card:focus-within {
    outline: 3px solid rgba(49, 87, 213, 0.2);
    outline-offset: 2px;
}
.choice-card input {
    width: 19px;
    height: 19px;
    margin: 2px 0 0;
    accent-color: var(--primary);
    cursor: pointer;
}
.choice-card__title {
    display: block;
    font-size: 0.98rem;
    line-height: 1.32;
}
.choice-card__description {
    display: block;
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.37;
}
.question-explanation {
    margin: -6px 0 6px;
    color: var(--text-secondary);
    font-size: 0.91rem;
    line-height: 1.48;
}
.info-link {
    color: var(--primary);
    font-size: 0.84rem;
    font-weight: 600;
}
.disclosure {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    transition:
        grid-template-rows var(--transition),
        opacity 0.15s ease,
        margin var(--transition);
}
.disclosure.is-open {
    grid-template-rows: 1fr;
    margin-top: 9px;
    opacity: 1;
}
.disclosure__inner {
    min-height: 0;
    overflow: hidden;
}
.disclosure__inner p {
    margin: 0;
    padding: 11px 12px;
    border-radius: 12px;
    background: var(--surface-muted);
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.45;
}
.result {
    max-width: 610px;
    margin: 0 auto;
    padding: clamp(16px, 4vw, 26px);
}
.result.is-entering {
    animation: result-in 0.3s var(--ease) both;
}
.result-hero {
    padding: clamp(24px, 6vw, 38px) 16px;
    border: 1px solid rgba(55, 132, 88, 0.17);
    border-radius: 22px;
    background:
        radial-gradient(circle at 50% -80px, rgba(65, 154, 101, 0.16), transparent 230px),
        linear-gradient(180deg, #f6fcf8, #edf8f1);
    text-align: center;
}
.result-hero__label {
    margin: 0 0 5px;
    color: var(--success);
}
.result-hero__amount {
    display: block;
    font-size: clamp(2.8rem, 11vw, 5.1rem);
    letter-spacing: -0.06em;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}
.result-hero__amount.is-updating {
    animation: amount-update 0.3s var(--ease);
}
@keyframes amount-update {
    0% {
        opacity: 0.45;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.result-hero__meta {
    display: flex;
    gap: 6px 18px;
    flex-wrap: wrap;
    margin: 16px 0 0;
    color: var(--text-secondary);
    font-size: 0.92rem;
}
.result-hero__meta strong {
    color: var(--text);
}
.result-hero__totals {
    width: min(100%, 430px);
    margin: 18px auto 0;
    padding-top: 15px;
    border-top: 1px solid rgba(23, 99, 58, 0.16);
}
.result-hero__total {
    gap: 2px;
    padding: 0 14px;
    color: var(--text-secondary);
    font-size: 0.82rem;
}
.result-hero__total + .result-hero__total {
    border-left: 1px solid rgba(23, 99, 58, 0.16);
}
.result-hero__total strong {
    color: var(--text);
    font-size: 1rem;
    font-variant-numeric: tabular-nums;
}
.result-hero__actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
    color: var(--text-muted);
}
.text-action {
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 600;
}
.text-action--muted {
    color: var(--text-muted);
    font-weight: 600;
}
.context-note {
    margin-top: 14px;
    padding: 12px 13px;
    border: 1px solid #f2d7a9;
    border-radius: 14px;
    background: var(--warning-soft);
}
.context-note p {
    margin: 0 0 6px;
    color: #6d410e;
    font-size: 0.84rem;
    line-height: 1.43;
}
.methodology,
.salary-calculation {
    border: 1px solid var(--border);
    background: var(--surface);
    overflow: hidden;
}
.methodology > summary,
.salary-calculation > summary {
    position: relative;
    padding: 15px 44px 15px 16px;
    cursor: pointer;
    list-style: none;
}
.methodology > summary::-webkit-details-marker,
.salary-calculation > summary::-webkit-details-marker {
    display: none;
}
.methodology > summary:after,
.salary-calculation > summary:after {
    content: "⌄";
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-55%);
    color: var(--text-muted);
    transition: transform var(--transition);
}
.methodology[open] > summary:after,
.salary-calculation[open] > summary:after {
    transform: translateY(-45%) rotate(180deg);
}
.calculation-body {
    padding: 2px 14px 16px;
}
.calc-step {
    position: relative;
    padding: 16px 0;
}
.calc-step__index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    margin-bottom: 8px;
    padding: 0 7px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary-strong);
    font-size: 0.74rem;
}
.calc-step h3 {
    font-size: 1.02rem;
}
.calc-step__text {
    margin: 5px 0 0;
    color: var(--text-secondary);
    font-size: 0.84rem;
    line-height: 1.45;
}
.deduction-list {
    display: grid;
    gap: 9px;
    margin-top: 12px;
}
.deduction-line,
.tax-line {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    font-size: 0.88rem;
    font-variant-numeric: tabular-nums;
}
.deduction-line span,
.tax-line span {
    color: var(--text-secondary);
}
.deduction-line strong,
.tax-line strong {
    color: var(--text);
    white-space: nowrap;
}
.deduction-total {
    margin-top: 12px;
    padding-top: 11px;
    border-top: 1px solid var(--border);
}
.deduction-total span {
    color: var(--text);
}
.deduction-amount {
    display: block;
    margin-top: 10px;
    color: var(--danger);
    font-size: 1.24rem;
    font-variant-numeric: tabular-nums;
}
.calc-note {
    margin: 6px 0 0;
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.42;
}
.remaining-box {
    margin-top: 13px;
    padding: 12px 13px;
    border-radius: 13px;
    background: var(--surface-muted);
}
.remaining-box strong {
    display: block;
    color: var(--text);
    font-size: 0.98rem;
    font-variant-numeric: tabular-nums;
}
.remaining-box small {
    display: block;
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 0.76rem;
    font-variant-numeric: tabular-nums;
}
.tax-summary {
    display: grid;
    gap: 9px;
    padding: 12px 13px;
    border-radius: 13px;
    background: var(--surface-muted);
}
.tax-line--total {
    margin-top: 2px;
    padding-top: 10px;
    border-top: 1px solid var(--border-strong);
}
.tax-line--total span,
.tax-line--total strong {
    color: var(--text);
}
.tax-explanation {
    margin-top: 11px;
}
.tax-explanation > summary {
    cursor: pointer;
    list-style: none;
    color: var(--primary);
    font-size: 0.83rem;
}
.tax-explanation > summary::-webkit-details-marker {
    display: none;
}
.tax-explanation__body {
    display: grid;
    gap: 9px;
    margin-top: 10px;
    padding: 11px 12px;
    border-radius: 12px;
    background: var(--surface-muted);
}
.tax-explanation__step {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.45;
}
.tax-explanation__step strong {
    color: var(--text);
}
.calculation-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}
.copy-link {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
}
.copy-link:hover {
    color: var(--primary);
}
.methodology {
    background: transparent;
}
.methodology > summary {
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 600;
}
.methodology__body {
    padding: 0 16px 15px;
    color: var(--text-secondary);
    font-size: 0.82rem;
}
.methodology__body p {
    margin: 0 0 7px;
}
.methodology__body ul {
    margin: 0;
    padding-left: 18px;
}
.methodology__body li + li {
    margin-top: 5px;
}
.parameters-dialog {
    width: min(92vw, 450px);
    max-height: min(82vh, 680px);
    margin: auto;
    padding: 18px;
    border: 0;
    border-radius: 22px;
    background: var(--surface);
    box-shadow: 0 30px 90px rgba(17, 24, 39, 0.25);
}
.parameters-dialog[open] {
    animation: dialog-in 0.22s var(--ease) both;
}
.parameters-dialog::backdrop {
    backdrop-filter: blur(3px);
}
@keyframes dialog-in {
    0% {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
.dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}
.dialog-header h2 {
    margin: 0;
    font-size: 1.2rem;
}
.icon-button {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text-muted);
    font-size: 1.35rem;
    cursor: pointer;
}
.icon-button:hover {
    background: var(--surface-muted);
    color: var(--text);
}
.parameters-list {
    display: grid;
    gap: 8px;
    max-height: 50vh;
    margin-bottom: 14px;
    overflow: auto;
}
.parameter-button {
    display: flex;
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--surface);
    text-align: left;
    cursor: pointer;
    transition:
        background var(--transition),
        border-color var(--transition),
        transform 0.13s ease;
}
.parameter-button:hover {
    border-color: var(--primary);
    background: var(--primary-soft);
    transform: translateY(-1px);
}
.parameter-button span {
    display: block;
    min-width: 0;
}
.parameter-button span span {
    color: var(--text-muted);
    font-size: 0.75rem;
}
.parameter-button strong {
    display: block;
    margin-top: 2px;
    font-size: 0.9rem;
}
.toast {
    position: fixed;
    left: 50%;
    bottom: max(20px, env(safe-area-inset-bottom));
    z-index: 20;
    max-width: calc(100vw - 30px);
    padding: 10px 14px;
    border-radius: 999px;
    background: #172033;
    color: #fff;
    font-size: 0.84rem;
    box-shadow: 0 12px 35px rgba(17, 24, 39, 0.24);
    opacity: 0;
    transform: translate(-50%, 12px);
    pointer-events: none;
    transition:
        opacity 0.16s ease,
        transform var(--transition);
}
.toast.is-visible {
    opacity: 1;
    transform: translate(-50%);
}
@keyframes fade-in {
    0% {
        opacity: 0;
        transform: translateY(3px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@media (max-width: 520px) {
    .result,
    .wizard {
        border-radius: 22px;
    }
    .wizard {
        padding: 20px 17px;
    }
    .result {
        padding: 14px 12px 16px;
    }
    .numeric-row {
        align-items: stretch;
    }
    .numeric-row .button {
        min-height: 56px;
    }
    .choice-card {
        padding: 12px 13px;
    }
    .result-hero__amount {
        font-size: clamp(2.65rem, 14vw, 4rem);
    }
}
@media (max-width: 380px) {
    .numeric-row {
        display: grid;
        grid-template-columns: minmax(0, max-content) minmax(110px, 1fr);
    }
    .number-input {
        font-size: 1.55rem;
    }
    .input-shell,
    .numeric-row .button {
        min-height: 54px;
        padding-inline: 13px;
    }
    .choice-card__description {
        font-size: 0.78rem;
    }
    .result-hero__actions {
        flex-wrap: wrap;
    }
    .result-hero__total {
        padding-inline: 8px;
    }
}
:root {
    --surface-soft: #f6f7fa;
    --surface-muted: #f3f4f6;
    --border: #dde2ea;
    --border-strong: #cbd2de;
    --success-soft: #eff9f3;
    --shadow: 0 10px 35px rgba(17, 24, 39, 0.07);
    --radius-md: 16px;
    --radius-lg: 22px;
    --transition: 200ms var(--ease);
}
body {
    background:
        radial-gradient(circle at 50% -180px, rgba(49, 87, 213, 0.07), transparent 380px), var(--surface-soft);
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        Segoe UI,
        Roboto,
        Arial,
        sans-serif;
}
.result,
.wizard {
    border: 1px solid #e1e5ec;
    border-radius: var(--radius-lg);
    background: var(--surface);
    backdrop-filter: none;
}
.wizard {
    padding: 24px;
}
.intro {
    max-height: 100px;
    margin: 0 auto 24px;
    opacity: 1;
    transform: none;
    transition:
        opacity 0.18s ease,
        max-height 0.22s ease,
        margin 0.22s ease;
}
.app.has-started .intro {
    margin-bottom: 0;
    transform: none;
}
.intro h1 {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.025em;
}
.step.is-active {
    animation: step-in 0.2s var(--ease) both;
}
@keyframes step-in {
    0% {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes step-in-back {
    0% {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.step h2,
fieldset legend {
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.025em;
}
.input-shell {
    min-height: 56px;
    padding: 0 15px;
    border-radius: 14px;
}
.number-input {
    padding-block: 10px;
    font-size: 30px;
    font-weight: 700;
}
.input-suffix {
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 500;
}
.button {
    min-height: 50px;
    padding-inline: 20px;
    border-radius: 14px;
    font-weight: 600;
}
.button:disabled {
    border-color: #e5e7eb;
    background: #e5e7eb;
    color: #9ca3af;
}
.button--primary:not(:disabled):hover {
    box-shadow: 0 6px 16px rgba(49, 87, 213, 0.2);
    transform: none;
}
.back-link,
.button--small,
.copy-link,
.info-link,
.text-action {
    font-weight: 600;
}
.choice-list {
    gap: 8px;
}
.choice-list--after-text {
    margin-top: 16px;
}
.choice-card {
    min-height: 58px;
    padding: 14px;
    border-color: var(--border);
    border-radius: 15px;
    transition:
        border-color var(--transition),
        background var(--transition),
        box-shadow var(--transition),
        transform var(--transition);
}
.choice-card:hover {
    border-color: #8498dd;
    background: #f5f7ff;
    box-shadow: 0 4px 12px rgba(49, 87, 213, 0.07);
}
.choice-card:has(input:checked),
.choice-card:has(input:checked):hover {
    border-color: var(--primary);
    background: var(--primary-soft);
    box-shadow: 0 0 0 2px rgba(49, 87, 213, 0.1);
}
.choice-card__title {
    font-size: 16px;
    font-weight: 600;
}
.choice-card__description {
    font-size: 13px;
    line-height: 1.4;
}
.question-explanation {
    margin-bottom: 8px;
}
.disclosure__inner p {
    padding: 12px;
    background: #f3f4f6;
    font-size: 13px;
}
.result {
    padding: 24px;
}
.result.is-entering {
    animation: result-in 0.25s var(--ease) both;
}
@keyframes result-in {
    0% {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.result-hero {
    padding: 32px 18px;
    border: 1px solid #d2ebdd;
    border-radius: 20px;
    background: var(--success-soft);
}
.result-hero__label {
    font-weight: 600;
}
.result-hero__amount {
    color: #104d2d;
    font-size: clamp(44px, 10vw, 68px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.045em;
    overflow-wrap: normal;
    white-space: nowrap;
}
.result-hero__total {
    font-weight: 500;
}
.result-hero__total strong {
    font-weight: 700;
}
.result-deductions {
    display: grid;
    gap: 0;
    margin-top: 16px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
}
.result-deductions__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 15px;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}
.result-deductions__row + .result-deductions__row {
    border-top: 1px solid var(--border);
}
.result-deductions__row span {
    color: var(--text-secondary);
}
.result-deductions__row strong {
    color: var(--text);
    font-weight: 700;
    white-space: nowrap;
}
.methodology,
.salary-calculation {
    margin-top: 16px;
    border-radius: 16px;
}
.methodology > summary,
.salary-calculation > summary {
    font-weight: 700;
}
.calc-step__index {
    font-weight: 800;
}
.deduction-total {
    font-weight: 700;
}
.deduction-amount,
.tax-line--total {
    font-weight: 800;
}
.result-actions {
    gap: 8px;
    margin-top: 16px;
    color: var(--text-muted);
}
.parameters-dialog {
    border-radius: 20px;
    box-shadow: 0 24px 70px rgba(17, 24, 39, 0.22);
}
.parameters-dialog::backdrop {
    background: rgba(17, 24, 39, 0.42);
    backdrop-filter: none;
}
.parameter-button:hover {
    transform: none;
}
@media (max-width: 520px) {
    .app {
        padding-inline: 10px;
    }
    .result,
    .wizard {
        border-radius: 20px;
    }
    .wizard {
        padding: 18px;
    }
    .result {
        padding: 12px;
    }
    .intro h1 {
        font-size: 24px;
    }
    .step h2,
    fieldset legend {
        font-size: 21px;
    }
    .numeric-row {
        display: grid;
        grid-template-columns: 1fr;
        align-items: stretch;
        gap: 8px;
    }
    .field-group,
    .input-shell,
    .numeric-row .button {
        width: 100%;
    }
    .number-input {
        max-width: calc(100% - 44px);
    }
    .result-hero {
        padding: 28px 14px;
    }
    .result-hero__amount {
        font-size: clamp(42px, 13vw, 60px);
    }
    .result-hero__totals {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .result-hero__total {
        padding: 0;
    }
    .result-hero__total + .result-hero__total {
        border-left: 0;
    }
    .result-deductions__row {
        padding-inline: 13px;
    }
    .result-actions {
        flex-wrap: wrap;
    }
}
@media (max-width: 380px) {
    .numeric-row {
        grid-template-columns: 1fr;
    }
    .number-input {
        font-size: 28px;
    }
    .result-hero__amount {
        font-size: clamp(38px, 12.5vw, 52px);
    }
}
@media (prefers-reduced-motion: reduce) {
    *,
    :after,
    :before {
        scroll-behavior: auto !important;
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 1ms !important;
    }
}
body {
    background:
        radial-gradient(circle at 50% -150px, rgba(49, 87, 213, 0.085), transparent 390px),
        radial-gradient(circle at 12% 34%, rgba(49, 87, 213, 0.025), transparent 280px), #f6f7fa;
}
.result,
.wizard {
    border-color: #dce2ec;
    box-shadow:
        0 24px 70px rgba(30, 44, 85, 0.075),
        0 4px 16px rgba(17, 24, 39, 0.035);
}
.input-shell {
    justify-content: flex-start;
    gap: 5px;
}
.number-input {
    flex: 0 0 auto;
    min-width: 2.6ch;
}
.input-suffix {
    flex: 0 0 auto;
    margin-left: 0;
    color: #4b5563;
}
.choice-card:hover {
    border-color: #6f86d9;
    background: #f3f6ff;
    box-shadow: 0 7px 18px rgba(49, 87, 213, 0.09);
    transform: translateY(-1px);
}
.choice-card:has(input:checked),
.choice-card:has(input:checked):hover {
    border-color: #3157d5;
    background: #eef2ff;
    box-shadow: 0 0 0 2px rgba(49, 87, 213, 0.11);
}
.result-deductions {
    width: min(100%, 480px);
    margin-inline: auto;
}
.result-deductions__row {
    column-gap: 20px;
}
.calculation-body {
    padding-inline: 18px;
}
.calc-note,
.calc-step > h3,
.calc-step__text,
.deduction-amount,
.deduction-list,
.tax-explanation,
.tax-summary {
    width: min(100%, 470px);
}
.deduction-line,
.tax-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    align-items: baseline;
    column-gap: 20px;
}
.deduction-list,
.tax-summary {
    margin-right: auto;
}
@media (min-width: 521px) {
    .app:not(.has-started) {
        min-height: 100vh;
        display: grid;
        align-items: center;
        padding-top: 24px;
        padding-bottom: 24px;
    }
    .app:not(.has-started) .wizard {
        min-height: clamp(440px, 60vh, 540px);
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 38px 42px;
    }
    .app:not(.has-started) .intro {
        width: min(100%, 430px);
        margin-bottom: 28px;
    }
    .app:not(.has-started) #hoursTitle,
    .app:not(.has-started) .intro h1 {
        text-align: center;
        text-wrap: balance;
    }
    .app:not(.has-started) #hoursTitle {
        width: min(100%, 400px);
        margin-right: auto;
        margin-left: auto;
    }
    .app:not(.has-started) .numeric-row {
        justify-content: center;
    }
    .app:not(.has-started) .field-message,
    .app:not(.has-started) .field-warning {
        text-align: left;
    }
}
@media (max-width: 520px) {
    .input-shell {
        width: 100%;
        justify-content: flex-start;
    }
    .number-input {
        flex: 0 0 auto;
        max-width: none;
    }
    .deduction-line,
    .result-deductions__row,
    .tax-line {
        column-gap: 14px;
    }
    .calculation-body {
        padding-inline: 14px;
    }
}
:root {
    --result-content-width: 520px;
    --result-radius: 18px;
}
@media (min-width: 521px) {
    .app:has(.wizard:not([hidden])) {
        min-height: 100vh;
        display: grid;
        align-items: center;
        padding-top: 24px;
        padding-bottom: 24px;
    }
    .app:has(.wizard:not([hidden])) .wizard {
        min-height: clamp(440px, 60vh, 540px);
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 38px 42px;
    }
    .app:has(.wizard:not([hidden])) .intro {
        width: min(100%, 430px);
    }
    .app:has(.wizard:not([hidden])) .stage,
    .app:has(.wizard:not([hidden])) .step__content {
        width: 100%;
    }
}
.context-note,
.methodology,
.result-deductions,
.result-hero,
.salary-calculation {
    border-radius: var(--result-radius);
}
.result-hero {
    padding: 30px 24px 24px;
}
.result-hero__meta {
    grid-template-columns: repeat(2, max-content);
    justify-content: center;
    margin: 14px auto 0;
}
.result-hero__meta span {
    padding: 0 14px;
}
.result-hero__meta span + span {
    border-left: 1px solid rgba(23, 99, 58, 0.18);
}
.result-hero__totals {
    width: min(100%, 420px);
    margin-top: 18px;
    border: 1px solid #d7ebe0;
    border-radius: 14px;
    overflow: hidden;
}
.result-hero__total {
    min-height: 68px;
    align-content: center;
    padding: 11px 16px;
}
.result-hero__total + .result-hero__total {
    border-left-color: #d7ebe0;
}
.result-deductions__row {
    grid-template-columns: minmax(0, 280px) max-content;
    min-height: 52px;
    padding: 0 18px;
    column-gap: 22px;
}
.methodology > summary,
.salary-calculation > summary {
    min-height: 52px;
    display: flex;
    align-items: center;
    padding-top: 14px;
    padding-bottom: 14px;
}
.calculation-body {
    padding: 14px;
    border-top: 1px solid var(--border);
    background: #f7f8fb;
}
.calc-step {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
}
.calc-step + .calc-step {
    border-top: 1px solid var(--border);
}
.calc-step h3 {
    width: 100%;
    margin: 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--surface-muted);
    font-size: 1rem;
}
.calc-step__text {
    width: min(100%, 420px);
    margin: 10px auto 0;
}
.calc-note,
.deduction-amount,
.deduction-list,
.tax-explanation,
.tax-summary {
    width: min(100%, 420px);
    margin-right: auto;
    margin-left: auto;
}
.deduction-line,
.tax-line {
    grid-template-columns: minmax(0, 260px) max-content;
    justify-content: center;
    min-height: 34px;
    column-gap: 18px;
}
.deduction-amount {
    margin-top: 12px;
    color: var(--text);
    font-size: 1rem;
    font-weight: 700;
    text-align: right;
}
.calc-note {
    margin-top: 7px;
}
.tax-summary {
    margin-top: 12px;
}
.calculation-actions {
    width: 100%;
    margin-top: 0;
    padding: 2px 2px 0;
}
.methodology__body {
    padding-right: 18px;
    padding-left: 18px;
}
@media (max-width: 520px) {
    .result-hero {
        padding: 28px 16px 22px;
    }
    .result-hero__meta {
        grid-template-columns: 1fr;
        gap: 4px;
    }
    .result-hero__meta span {
        padding: 0;
    }
    .result-hero__meta span + span {
        border-left: 0;
    }
    .deduction-line,
    .result-deductions__row,
    .tax-line {
        grid-template-columns: minmax(0, 1fr) max-content;
        justify-content: stretch;
        column-gap: 12px;
    }
    .result-deductions__row {
        padding: 0 14px;
    }
    .calculation-body {
        padding: 12px;
    }
    .calc-step {
        padding: 14px;
    }
}
.result-deductions {
    grid-template-columns: max-content max-content;
    justify-content: center;
    column-gap: 22px;
    padding: 0 18px;
}
.result-deductions__row {
    display: contents;
}
.result-deductions__row > span,
.result-deductions__row > strong {
    display: flex;
    align-items: center;
    min-height: 52px;
}
.result-deductions__row + .result-deductions__row > span,
.result-deductions__row + .result-deductions__row > strong {
    border-top: 1px solid var(--border);
}
.deduction-list,
.tax-summary {
    grid-template-columns: max-content max-content;
    justify-content: center;
    row-gap: 0;
}
.deduction-total > span,
.deduction-total > strong,
.tax-line--total > span,
.tax-line--total > strong {
    margin-top: 4px;
    border-top: 1px solid var(--border-strong);
}
.calc-step__heading-row {
    grid-template-columns: max-content max-content;
    justify-content: center;
    width: min(100%, 420px);
    margin: 0 auto;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--surface-muted);
}
.calc-step__heading-row h3 {
    padding: 0;
    background: transparent;
}
@media (max-width: 520px) {
    .result-deductions {
        padding: 0 14px;
    }
    .calc-step__heading-row,
    .deduction-list,
    .result-deductions,
    .tax-summary {
        grid-template-columns: minmax(0, 1fr) max-content;
        justify-content: stretch;
        column-gap: 12px;
    }
}
:root {
    --primary: #2563eb;
    --primary-strong: #1d4ed8;
    --primary-soft: #eff6ff;
    --surface-soft: #f4f7fb;
    --surface-muted: #f5f7fb;
    --border: #dbe3ee;
    --border-strong: #bfcee2;
    --success: #166534;
    --success-soft: #ecfdf3;
    --shadow: 0 28px 80px rgba(15, 23, 42, 0.1), 0 6px 22px rgba(37, 99, 235, 0.045);
    --radius-lg: 28px;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --transition: 220ms var(--ease);
}
html {
    background: #eef3f8;
}
body {
    position: relative;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 16% 20%, rgba(37, 99, 235, 0.105), transparent 340px),
        radial-gradient(circle at 84% 78%, rgba(22, 163, 74, 0.085), transparent 390px),
        linear-gradient(180deg, #f9fbfd, #eef3f8);
}
body:after,
body:before {
    content: "";
    position: fixed;
    pointer-events: none;
    z-index: 0;
}
body:before {
    opacity: 0.62;
    background-image:
        repeating-linear-gradient(135deg, rgba(37, 99, 235, 0.06) 0 1px, transparent 1px 14px),
        radial-gradient(circle, rgba(37, 99, 235, 0.11) 1.2px, transparent 1.5px),
        linear-gradient(rgba(37, 99, 235, 0.025) 1px, transparent 0),
        linear-gradient(90deg, rgba(37, 99, 235, 0.025) 1px, transparent 0);
    background-size:
        170px 170px,
        22px 22px,
        52px 52px,
        52px 52px;
    background-position:
        calc(100% - 54px) 18px,
        54px 34%,
        0 0,
        0 0;
    -webkit-mask-image: radial-gradient(ellipse at center, #000 10%, transparent 82%);
    mask-image: radial-gradient(ellipse at center, #000 10%, transparent 82%);
}
body:after {
    inset: -80px;
    opacity: 0.72;
    background:
        radial-gradient(circle at 8% 75%, hsla(0, 0%, 100%, 0.84) 0 130px, transparent 132px),
        radial-gradient(circle at 92% 30%, hsla(0, 0%, 100%, 0.64) 0 105px, transparent 108px),
        radial-gradient(circle at 10% 18%, rgba(37, 99, 235, 0.06), transparent 230px),
        radial-gradient(circle at 88% 82%, rgba(22, 163, 74, 0.055), transparent 250px);
    animation: ambient-float 11s ease-in-out infinite alternate;
}
@keyframes ambient-float {
    0% {
        transform: translateZ(0);
    }
    to {
        transform: translate3d(16px, -12px, 0);
    }
}
.app {
    position: relative;
    z-index: 1;
    width: min(100%, 820px);
    padding: max(18px, env(safe-area-inset-top)) 14px max(34px, env(safe-area-inset-bottom));
}
.result,
.wizard {
    border: 1px solid rgba(219, 227, 238, 0.96);
    border-radius: 28px;
    background: hsla(0, 0%, 100%, 0.965);
    box-shadow: var(--shadow);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.wizard {
    position: relative;
    max-width: 560px;
    padding: clamp(28px, 5vw, 46px);
    overflow: hidden;
}
.wizard:before {
    content: "";
    position: absolute;
    width: 270px;
    height: 270px;
    top: -205px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(37, 99, 235, 0.12),
        rgba(37, 99, 235, 0.025) 58%,
        transparent 72%
    );
    pointer-events: none;
}
.wizard > * {
    position: relative;
    z-index: 1;
}
.intro h1 {
    color: #0f1e3a;
    font-size: clamp(1.62rem, 5vw, 2.15rem);
    line-height: 1.14;
    letter-spacing: -0.035em;
}
.step h2,
fieldset legend {
    color: #18233c;
    font-size: clamp(1.28rem, 4vw, 1.65rem);
    line-height: 1.22;
}
.step.is-active {
    animation: fintech-step-in 0.24s var(--ease) both;
}
.step.is-entering-back {
    animation-name: fintech-step-back;
}
@keyframes fintech-step-in {
    0% {
        opacity: 0;
        transform: translateY(10px) scale(0.985);
        filter: blur(2px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}
@keyframes fintech-step-back {
    0% {
        opacity: 0;
        transform: translateY(-8px) scale(0.985);
        filter: blur(1px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}
.input-shell {
    min-height: 58px;
    width: max-content;
    max-width: 100%;
    gap: 6px;
    padding: 0 16px;
    border: 1.5px solid #c8d4e6;
    border-radius: 16px;
    background: hsla(0, 0%, 100%, 0.98);
    box-shadow:
        inset 0 1px 0 hsla(0, 0%, 100%, 0.9),
        0 5px 14px rgba(15, 23, 42, 0.035);
    transition:
        transform var(--transition),
        border-color var(--transition),
        box-shadow var(--transition),
        background var(--transition);
}
.input-shell:focus-within {
    transform: translateY(-1px);
    box-shadow:
        0 0 0 4px rgba(37, 99, 235, 0.12),
        0 14px 30px rgba(15, 23, 42, 0.08);
}
.number-input {
    font-size: 1.85rem;
    color: #101c35;
}
.input-suffix {
    color: #46556f;
    font-size: 1rem;
    font-weight: 600;
}
.button {
    border-radius: 16px;
}
.button--primary {
    min-height: 54px;
    padding-inline: 22px;
    border: 0;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow:
        0 14px 28px rgba(37, 99, 235, 0.22),
        inset 0 1px 0 hsla(0, 0%, 100%, 0.22);
}
.button--primary:not(:disabled):hover {
    background: linear-gradient(135deg, #2f6df0, #1d4ed8);
    transform: translateY(-1px);
    box-shadow:
        0 18px 34px rgba(37, 99, 235, 0.28),
        inset 0 1px 0 hsla(0, 0%, 100%, 0.25);
}
.button:disabled {
    opacity: 1;
    color: #9aa6b8;
    background: #e8edf4;
    box-shadow: none;
}
.choice-list {
    gap: 10px;
}
.choice-card {
    min-height: 60px;
    padding: 15px 16px;
    border: 1px solid #dce4ef;
    border-radius: 19px;
    background: hsla(0, 0%, 100%, 0.98);
    box-shadow: 0 5px 16px rgba(15, 23, 42, 0.035);
    transition:
        transform 0.19s var(--ease),
        border-color var(--transition),
        background var(--transition),
        box-shadow var(--transition);
}
.choice-card:hover {
    border-color: rgba(37, 99, 235, 0.55);
    box-shadow: 0 14px 34px rgba(37, 99, 235, 0.12);
    transform: translateY(-2px);
}
.choice-card:has(input:checked),
.choice-card:has(input:checked):hover {
    box-shadow:
        0 0 0 2px rgba(37, 99, 235, 0.1),
        0 12px 28px rgba(37, 99, 235, 0.1);
    animation: selected-pulse 0.18s ease-out;
}
@keyframes selected-pulse {
    0% {
        transform: scale(0.99);
    }
    to {
        transform: scale(1);
    }
}
.back-link:hover,
.info-link,
.info-link:hover,
.text-action,
.text-action:hover {
    color: #2563eb;
}
.context-note,
.disclosure__inner p {
    border-color: #dce4ef;
    background: #f5f7fb;
}
.result {
    max-width: 780px;
    padding: 26px;
}
.result > .context-note,
.result > .methodology,
.result > .result-actions,
.result > .result-deductions,
.result > .result-hero,
.result > .salary-calculation {
    width: 100%;
}
.result-hero {
    position: relative;
    padding: 30px 28px 24px;
    border: 1px solid #cee8d8;
    border-radius: 24px;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% -120px, rgba(34, 197, 94, 0.1), transparent 290px),
        linear-gradient(180deg, #f2fcf6, #ecf9f1);
    box-shadow: inset 0 1px 0 hsla(0, 0%, 100%, 0.9);
}
.result-hero:before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(118deg, hsla(0, 0%, 100%, 0.44), transparent 42%);
}
.result-hero > * {
    position: relative;
    z-index: 1;
}
.result-hero__label {
    color: #176b39;
    font-size: 1rem;
    font-weight: 700;
}
.result-hero__amount {
    color: #087333;
    font-size: clamp(52px, 9vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.055em;
    text-shadow: 0 1px 0 hsla(0, 0%, 100%, 0.55);
    animation: amount-in 0.34s var(--ease) both;
}
@keyframes amount-in {
    0% {
        opacity: 0;
        transform: translateY(8px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
.result-hero__meta {
    width: min(100%, 470px);
    margin-top: 16px;
    color: #41506a;
}
.result-hero__meta strong {
    color: #17233d;
}
.result-hero__totals {
    width: min(100%, 570px);
    margin-top: 20px;
    padding-top: 17px;
    border-top: 1px solid rgba(22, 101, 52, 0.18);
    background: transparent;
}
.result-hero__total {
    min-height: 54px;
    padding: 4px 22px;
}
.result-hero__total span {
    color: #526077;
}
.result-hero__total strong {
    color: #0f1c35;
    font-size: 1.03rem;
}
.result-hero__total + .result-hero__total {
    border-left: 1px solid rgba(22, 101, 52, 0.16);
}
.result-deductions {
    display: block;
    margin-top: 14px;
    padding: 0;
    border: 1px solid #dbe4ef;
    border-radius: 18px;
    background: hsla(0, 0%, 100%, 0.94);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
    overflow: hidden;
}
.result-deductions__row {
    grid-template-columns: minmax(0, 360px) max-content;
    justify-content: center;
    column-gap: 26px;
    font-size: 0.92rem;
}
.result-deductions__row + .result-deductions__row {
    border-top: 1px solid #e2e8f0;
}
.result-deductions__row + .result-deductions__row > span,
.result-deductions__row + .result-deductions__row > strong,
.result-deductions__row > span,
.result-deductions__row > strong {
    display: block;
    min-height: 0;
    border-top: 0;
}
.result-deductions__row > span {
    position: relative;
    padding-left: 38px;
    color: #46546c;
}
.result-deductions__row > span:before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 27px;
    height: 27px;
    transform: translateY(-50%);
    border-radius: 50%;
    background-color: #eff4ff;
    background-repeat: no-repeat;
    background-position: 50%;
    background-size: 15px 15px;
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.06);
}
.result-deductions__row:first-child > span:before {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%232563eb' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.8' viewBox='0 0 24 24'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M22 21v-2a4 4 0 0 0-3-3.87m-3-12a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E");
}
.result-deductions__row:nth-child(2) > span:before {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%232563eb' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.8' viewBox='0 0 24 24'%3E%3Cpath d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78L12 21.23l8.84-8.84a5.5 5.5 0 0 0 0-7.78'/%3E%3C/svg%3E");
}
.result-deductions__row:nth-child(3) > span:before {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%232563eb' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.8' viewBox='0 0 24 24'%3E%3Cpath d='M19 5 5 19'/%3E%3Ccircle cx='6.5' cy='6.5' r='2.5'/%3E%3Ccircle cx='17.5' cy='17.5' r='2.5'/%3E%3C/svg%3E");
}
.result-deductions__row > strong {
    color: #111d35;
    font-size: 0.96rem;
    font-weight: 750;
}
.methodology,
.salary-calculation {
    margin-top: 14px;
    border: 1px solid #dbe4ef;
    border-radius: 18px;
    background: hsla(0, 0%, 100%, 0.94);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.035);
}
.methodology > summary,
.salary-calculation > summary {
    min-height: 56px;
    padding: 15px 48px 15px 18px;
    color: #1b2943;
}
.calc-step {
    min-height: 232px;
    display: flex;
    flex-direction: column;
    padding: 15px;
    box-shadow: 0 5px 16px rgba(15, 23, 42, 0.035);
}
.calculation-body > .calc-step:first-child:nth-last-child(2) {
    grid-column: 1/-1;
    min-height: 0;
}
.calc-step__index {
    height: 23px;
    margin: 0 0 9px;
    background: #eaf2ff;
    color: #2563eb;
}
.calc-step h3,
.calc-step__heading-row {
    width: 100%;
    margin: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
}
.calc-step h3 {
    font-size: 0.84rem;
    line-height: 1.32;
}
.calc-step__heading-row {
    grid-template-columns: minmax(0, 1fr);
    justify-content: stretch;
    align-items: start;
    row-gap: 15px;
}
.calc-step__heading-row h3 {
    width: 100%;
}
.calc-step__heading-row .deduction-amount {
    width: 100%;
    color: #111d35;
    font-size: 1.12rem;
    text-align: left;
}
.calc-note,
.calc-step__text {
    width: 100%;
    margin: 9px 0 0;
    color: #6b778b;
    font-size: 0.72rem;
}
.deduction-list,
.tax-summary {
    justify-content: stretch;
    column-gap: 10px;
}
.deduction-line,
.tax-line {
    display: contents;
}
.deduction-line > span,
.deduction-line > strong,
.tax-line > span,
.tax-line > strong {
    display: flex;
    align-items: center;
    min-height: 34px;
    border-top: 0;
}
.deduction-line > span,
.tax-line > span {
    color: #68758a;
}
.deduction-line > strong,
.tax-line > strong {
    color: #1b2943;
}
.deduction-total > span,
.deduction-total > strong,
.tax-line--total > span,
.tax-line--total > strong {
    padding-top: 9px;
    border-top: 1px solid #dfe6ef;
    color: #111d35;
    font-size: 0.74rem;
    font-weight: 750;
}
.tax-explanation {
    width: 100%;
}
.tax-explanation > summary {
    color: #2563eb;
    line-height: 1.35;
}
.tax-explanation__body {
    padding: 9px 0 0;
}
.tax-explanation__step {
    font-size: 0.68rem;
}
.calculation-actions {
    margin: 0;
}
.copy-link {
    color: #5d6b80;
}
.result-actions {
    min-height: 48px;
    margin-top: 14px;
    padding: 10px 16px;
    border: 1px solid #dbe4ef;
    border-radius: 16px;
    background: hsla(0, 0%, 100%, 0.94);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.03);
}
.text-action {
    color: #2563eb;
}
.methodology__body {
    border-top: 1px solid #e2e8f0;
    padding: 0 18px 16px;
}
@media (min-width: 521px) {
    .app:has(.wizard:not([hidden])) {
        min-height: 100vh;
        align-items: center;
        padding-top: 28px;
        padding-bottom: 28px;
    }
    .app:has(.wizard:not([hidden])) .wizard {
        min-height: clamp(470px, 62vh, 570px);
        padding: 44px 48px;
    }
    .app:not(.has-started) .intro {
        margin-bottom: 30px;
    }
    .app:not(.has-started) .numeric-row {
        width: min(100%, 340px);
        display: grid;
        grid-template-columns: 1fr;
        justify-items: stretch;
        margin-inline: auto;
        gap: 12px;
    }
    .app:not(.has-started) .field-group {
        justify-self: center;
    }
    .app:not(.has-started) .numeric-row .button {
        width: 100%;
    }
}
@media (max-width: 719px) {
    .app {
        width: min(100%, 660px);
        padding-inline: 10px;
    }
    .result {
        max-width: 610px;
        padding: 13px;
    }
    .calculation-body {
        grid-template-columns: 1fr;
    }
    .calc-step {
        min-height: 0;
    }
    .calculation-body > .calc-step:first-child:nth-last-child(2) {
        grid-column: auto;
    }
}
@media (max-width: 520px) {
    .result,
    .wizard {
        border-radius: 22px;
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
    }
    .wizard {
        padding: 22px 18px;
    }
    .numeric-row {
        grid-template-columns: 1fr;
        justify-items: stretch;
    }
    .field-group {
        justify-self: center;
    }
    .field-group,
    .input-shell {
        width: max-content;
        max-width: 100%;
    }
    .numeric-row .button {
        width: 100%;
    }
    .result-hero {
        padding: 27px 15px 21px;
        border-radius: 19px;
    }
    .result-hero__amount {
        font-size: clamp(40px, 12vw, 58px);
    }
    .result-hero__totals {
        grid-template-columns: 1fr 1fr;
        gap: 0;
    }
    .result-hero__total {
        min-height: 64px;
        padding: 7px 10px;
    }
    .result-hero__total + .result-hero__total {
        border-left: 1px solid rgba(22, 101, 52, 0.16);
    }
    .result-deductions__row {
        grid-template-columns: minmax(0, 1fr) max-content;
        justify-content: stretch;
        min-height: 56px;
        padding: 0 13px;
        column-gap: 10px;
        font-size: 0.82rem;
    }
    .result-deductions__row > span {
        padding-left: 32px;
    }
    .result-deductions__row > span:before {
        width: 24px;
        height: 24px;
        background-size: 13px 13px;
    }
    .methodology > summary,
    .salary-calculation > summary {
        min-height: 54px;
        padding-left: 15px;
    }
    .result-actions {
        flex-wrap: wrap;
    }
}
#rateShell {
    min-width: 172px;
}
.calc-step__index {
    width: 23px;
    min-width: 23px;
    padding: 0;
    align-self: flex-start;
    border-radius: 50%;
}
.tax-line > span {
    white-space: nowrap;
}
@media (min-width: 521px) {
    .app:not(.has-started) .wizard:after {
        content: "";
        position: absolute;
        z-index: 2;
        top: 34px;
        left: 50%;
        width: 68px;
        height: 68px;
        transform: translateX(-50%);
        border: 1px solid rgba(37, 99, 235, 0.07);
        border-radius: 50%;
        background-color: #f1f6ff;
        background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='34' height='34' fill='none' stroke='%232563eb' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.55' viewBox='0 0 24 24'%3E%3Crect width='16' height='20' x='4' y='2' rx='2.5'/%3E%3Crect width='10' height='4' x='7' y='5' rx='1'/%3E%3Cpath d='M8 13h.01M12 13h.01M16 13h.01M8 17h.01M12 17h.01M16 17h.01'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: 50%;
        box-shadow:
            0 12px 30px rgba(37, 99, 235, 0.1),
            inset 0 1px 0 hsla(0, 0%, 100%, 0.9);
        pointer-events: none;
    }
    .app:not(.has-started) .numeric-row {
        width: min(100%, 270px);
    }
    .app:not(.has-started) #hoursShell,
    .app:not(.has-started) .field-group {
        width: 100%;
    }
}
@media (max-width: 719px) {
    .tax-line > span {
        white-space: normal;
    }
}
.tax-line > span {
    white-space: normal;
}
.tax-line:nth-child(3) > span {
    white-space: nowrap;
    font-size: 0.65rem;
}
.deduction-line > span {
    font-size: 0.66rem;
    line-height: 1.28;
}
:root {
    --result-content-width: 720px;
}
body {
    background:
        radial-gradient(circle at 10% 18%, rgba(37, 99, 235, 0.17), transparent 430px),
        radial-gradient(circle at 91% 74%, rgba(22, 163, 74, 0.13), transparent 460px),
        radial-gradient(circle at 74% 9%, rgba(96, 165, 250, 0.08), transparent 280px),
        linear-gradient(180deg, #fbfdff, #edf3f9);
}
body:before {
    opacity: 0.78;
    background-image:
        repeating-linear-gradient(135deg, rgba(37, 99, 235, 0.09) 0 1px, transparent 1px 16px),
        radial-gradient(circle, rgba(37, 99, 235, 0.18) 1.35px, transparent 1.7px),
        linear-gradient(rgba(37, 99, 235, 0.035) 1px, transparent 0),
        linear-gradient(90deg, rgba(37, 99, 235, 0.035) 1px, transparent 0);
    background-size:
        210px 210px,
        24px 24px,
        54px 54px,
        54px 54px;
    background-position:
        calc(100% - 42px) 24px,
        54px 39%,
        0 0,
        0 0;
    background-repeat: no-repeat, no-repeat, repeat, repeat;
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 12%, #000 88%, transparent);
    mask-image: linear-gradient(180deg, transparent 0, #000 12%, #000 88%, transparent);
}
body:after {
    inset: -70px;
    opacity: 0.9;
    background:
        radial-gradient(
            circle at 2% 82%,
            transparent 0 154px,
            rgba(37, 99, 235, 0.075) 156px 158px,
            transparent 160px
        ),
        radial-gradient(
            circle at 95% 24%,
            transparent 0 128px,
            rgba(37, 99, 235, 0.065) 130px 132px,
            transparent 134px
        ),
        radial-gradient(circle at 11% 17%, hsla(0, 0%, 100%, 0.8) 0 112px, transparent 114px),
        radial-gradient(circle at 88% 83%, hsla(0, 0%, 100%, 0.66) 0 128px, transparent 130px),
        radial-gradient(circle at 13% 19%, rgba(37, 99, 235, 0.07), transparent 250px),
        radial-gradient(circle at 87% 79%, rgba(22, 163, 74, 0.065), transparent 280px);
    animation: ambient-float 10s ease-in-out infinite alternate;
}
.app:not(.has-started) .intro {
    margin-bottom: 30px;
    transform: none;
}
#hoursShell,
#rateShell {
    width: 190px;
    min-width: 190px;
    max-width: 190px;
}
.step.is-leaving {
    display: block;
    animation: fintech-step-out 60ms ease-in both;
    pointer-events: none;
}
@keyframes fintech-step-out {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
    to {
        opacity: 0;
        transform: translateY(-7px) scale(0.992);
        filter: blur(1px);
    }
}
.step.is-active {
    animation: fintech-step-in-v6 0.2s var(--ease) both;
}
.step.is-entering-back {
    animation-name: fintech-step-back-v6;
}
@keyframes fintech-step-in-v6 {
    0% {
        opacity: 0;
        transform: translateY(14px) scale(0.98);
        filter: blur(2px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}
@keyframes fintech-step-back-v6 {
    0% {
        opacity: 0;
        transform: translateY(-11px) scale(0.982);
        filter: blur(1.5px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}
.wizard.is-step-changing:before {
    animation: question-glow 0.24s var(--ease);
}
@keyframes question-glow {
    0% {
        opacity: 0.55;
        transform: translateX(-50%) translateY(0) scale(0.96);
    }
    55% {
        opacity: 1;
        transform: translateX(-50%) translateY(8px) scale(1.04);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}
.choice-card:hover {
    box-shadow:
        inset 0 0 0 1px rgba(37, 99, 235, 0.1),
        0 10px 25px rgba(37, 99, 235, 0.1);
}
.choice-card:has(input:checked),
.choice-card:has(input:checked):hover {
    box-shadow:
        inset 0 0 0 1px rgba(37, 99, 235, 0.2),
        0 9px 22px rgba(37, 99, 235, 0.09);
}
.choice-card:focus-within {
    outline: 0;
    outline-offset: 0;
}
.choice-card:has(input:focus-visible) {
    border-color: #2563eb;
    box-shadow:
        inset 0 0 0 2px rgba(37, 99, 235, 0.18),
        0 8px 20px rgba(37, 99, 235, 0.08);
}
.step h2:focus,
fieldset legend:focus {
    outline: none;
}
.result > .context-note,
.result > .methodology,
.result > .result-actions,
.result > .result-deductions,
.result > .result-hero,
.result > .salary-calculation {
    width: min(100%, var(--result-content-width));
    margin-right: auto;
    margin-left: auto;
}
.result-hero__meta,
.result-hero__totals {
    width: min(100%, 560px);
}
.result-hero__meta {
    gap: 0;
    margin: 18px auto 0;
    border: 1px solid rgba(22, 101, 52, 0.15);
    border-bottom: 0;
    border-radius: 15px 15px 0 0;
    background: hsla(0, 0%, 100%, 0.58);
    overflow: hidden;
}
.result-hero__meta span {
    min-height: 50px;
    padding: 10px 16px;
}
.result-hero__totals {
    margin: 0 auto;
    padding: 0;
    border: 1px solid rgba(22, 101, 52, 0.15);
    border-radius: 0 0 15px 15px;
    background: hsla(0, 0%, 100%, 0.72);
}
.result-hero__total {
    min-height: 62px;
    padding: 10px 18px;
}
.result-hero__total + .result-hero__total {
    border-left-color: rgba(22, 101, 52, 0.14);
}
.result-deductions__row {
    justify-content: stretch;
    padding: 0 22px;
}
.result-deductions__row > span:before {
    display: block;
}
.result:has(.salary-calculation[open]) .result-deductions {
    display: none;
}
.calculation-body {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 0;
    border-radius: 0 0 17px 17px;
    background: hsla(0, 0%, 100%, 0.98);
    overflow: hidden;
}
.calc-step {
    min-height: 248px;
    padding: 17px 15px 16px;
}
.calc-step + .calc-step {
    border-top: 0;
    border-left: 1px solid #e2e8f0;
}
.calc-step__index {
    display: none !important;
}
.calc-step h3 {
    min-height: 40px;
    color: #1b2943;
    font-size: 0.82rem;
    line-height: 1.3;
}
.calc-step__heading-row {
    row-gap: 10px;
}
.calc-step__heading-row .deduction-amount {
    font-size: 0.93rem;
    font-weight: 700;
}
.deduction-list,
.tax-summary {
    grid-template-columns: minmax(118px, 1fr) max-content;
    column-gap: 8px;
}
.deduction-line > span,
.deduction-line > strong,
.tax-line > span,
.tax-line > strong {
    font-size: 0.69rem;
    line-height: 1.3;
}
.deduction-line > span {
    max-width: 138px;
}
.deduction-line > strong,
.tax-line > strong {
    font-variant-numeric: tabular-nums;
}
.tax-explanation {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #e5eaf1;
}
.tax-explanation > summary {
    color: #5b687c;
    font-size: 0.7rem;
    font-weight: 600;
    text-decoration: none;
}
.tax-explanation > summary:hover {
    color: #334155;
}
.calculation-actions {
    grid-column: 1/-1;
    border-top: 1px solid #e2e8f0;
    padding: 11px 15px;
    background: #f8fafc;
}
@media (max-width: 719px) {
    :root {
        --result-content-width: 100%;
    }
    .calculation-body {
        grid-template-columns: 1fr;
    }
    .calc-step {
        min-height: 0;
    }
    .calc-step + .calc-step {
        border-left: 0;
        border-top: 1px solid #e2e8f0;
    }
    .deduction-line > span {
        max-width: none;
    }
}
@media (max-width: 520px) {
    #hoursShell,
    #rateShell {
        width: 190px;
        min-width: 190px;
        max-width: min(190px, 100%);
    }
    .result-hero__meta span {
        min-height: 56px;
        padding-inline: 10px;
        font-size: 0.82rem;
    }
    .result-deductions__row {
        padding-inline: 13px;
        column-gap: 9px;
    }
    .result-deductions__row > strong {
        min-width: 90px;
    }
}
body {
    background:
        radial-gradient(ellipse at 8% 14%, rgba(37, 99, 235, 0.13), transparent 38%),
        radial-gradient(ellipse at 86% 88%, rgba(16, 185, 129, 0.09), transparent 42%),
        radial-gradient(ellipse at 72% 12%, rgba(147, 197, 253, 0.08), transparent 28%),
        linear-gradient(180deg, #fbfdff, #eef3f8);
}
body:before {
    inset: 0;
    opacity: 0.42;
    background:
        linear-gradient(122deg, transparent 22%, rgba(37, 99, 235, 0.055) 47%, transparent 72%),
        linear-gradient(164deg, transparent 38%, rgba(15, 118, 110, 0.035) 55%, transparent 72%);
    background-size: 100% 100%;
    background-position: 50%;
    background-repeat: no-repeat;
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 18%, #000 82%, transparent);
    mask-image: linear-gradient(180deg, transparent 0, #000 18%, #000 82%, transparent);
}
body:after {
    inset: auto -12vw 8vh auto;
    width: min(58vw, 720px);
    height: min(34vw, 390px);
    border-radius: 46% 54% 61% 39%/43% 37% 63% 57%;
    opacity: 0.55;
    background: rgba(96, 165, 250, 0.12);
    filter: blur(72px);
    animation: none;
}
.wizard:after,
.wizard:before {
    display: none !important;
}
.app.has-started .intro,
.app:not(.has-started) .intro {
    display: block;
    grid-template-rows: 1fr;
    max-height: 120px;
    margin: 0 auto 26px;
    opacity: 1;
    transform: none;
    pointer-events: auto;
}
.step[data-step="hours"] h2,
.step[data-step="rate"] h2 {
    text-align: center;
}
.step[data-step="hours"] .numeric-row,
.step[data-step="rate"] .numeric-row {
    display: grid;
    grid-template-columns: minmax(0, 190px);
    justify-content: center;
    align-items: stretch;
    width: 100%;
    gap: 10px;
}
.step[data-step="hours"] .field-group,
.step[data-step="hours"] .input-shell,
.step[data-step="hours"] .numeric-row .button,
.step[data-step="rate"] .field-group,
.step[data-step="rate"] .input-shell,
.step[data-step="rate"] .numeric-row .button {
    width: 100%;
    min-width: 0;
    max-width: 190px;
}
#hoursShell,
#rateShell {
    min-height: 58px;
    height: 58px;
    padding: 0 16px;
    border-radius: 16px;
}
#hoursShell .number-input,
#rateShell .number-input {
    width: 100% !important;
    min-width: 0;
    max-width: none;
    padding: 10px 0;
}
.input-suffix {
    display: none !important;
}
.input-shell {
    overflow: hidden;
    transform: none;
    box-shadow: inset 0 1px 0 hsla(0, 0%, 100%, 0.9);
}
.input-shell:hover {
    border-color: #9fb2cf;
    background: #fbfdff;
    transform: none;
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.06);
}
.input-shell:focus-within {
    border-color: var(--primary);
    background: #f8fbff;
    transform: none;
    box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.16);
}
.choice-card {
    overflow: hidden;
}
.choice-card:hover {
    border-color: rgba(37, 99, 235, 0.62);
    background: #eff6ff;
    transform: none;
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.12);
}
.choice-card:has(input:checked),
.choice-card:has(input:checked):hover {
    border-color: #2563eb;
    background: #eaf2ff;
    transform: none;
    box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.16);
    animation: none;
}
.choice-card:has(input:focus-visible):not(:has(input:checked)):not(:hover) {
    border-color: var(--border);
    background: var(--surface);
    box-shadow: none;
}
.step.is-leaving {
    animation-duration: 1ms;
}
.step.is-active {
    animation-duration: 0.2s;
}
.disclosure {
    transition:
        grid-template-rows 0.22s var(--ease),
        opacity 0.2s ease,
        margin 0.22s var(--ease);
}
.disclosure__inner {
    opacity: 0;
    transform: translateY(-5px);
    transition:
        opacity 0.19s ease,
        transform 0.22s var(--ease);
}
.disclosure.is-open .disclosure__inner {
    opacity: 1;
    transform: translateY(0);
}
.result-hero__meta {
    grid-template-columns: 1fr;
    width: min(100%, 420px);
}
.result-hero__meta span {
    gap: 0.3em;
    min-height: 46px;
    padding: 9px 14px;
}
.result-hero__meta span + span {
    border-left: 0;
    border-top: 1px solid rgba(22, 101, 52, 0.14);
}
.result-deductions__row {
    padding: 10px 22px;
}
.result-deductions__row > span {
    display: flex;
    padding-left: 0;
}
.result-deductions__row > span:before {
    flex: 0 0 28px;
}
.result-deductions__row > strong {
    font-variant-numeric: tabular-nums;
}
.calculation-body {
    align-items: stretch;
    gap: 12px;
    padding: 12px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    overflow: visible;
}
.calc-step {
    min-width: 0;
    padding: 18px;
    border: 1px solid #dce5ef;
    border-radius: 15px;
    background: hsla(0, 0%, 100%, 0.98);
}
.calc-step + .calc-step {
    border-top: 1px solid #dce5ef;
    border-left: 1px solid #dce5ef;
}
.calc-step h3 {
    min-height: 0;
}
.calc-step__heading-row {
    column-gap: 18px;
}
.calc-step__heading-row .deduction-amount {
    justify-self: end;
}
.calc-note,
.calc-step__text {
    font-size: 0.8rem;
}
.deduction-list,
.tax-summary {
    column-gap: 18px;
}
.deduction-line > span,
.deduction-line > strong,
.tax-line > span,
.tax-line > strong {
    min-height: 38px;
    font-size: 0.82rem;
    line-height: 1.35;
}
.deduction-line > span,
.tax-line > span {
    max-width: none;
}
.deduction-line > span,
.tax-line:nth-child(3) > span {
    font-size: 0.82rem;
}
.tax-explanation {
    padding-top: 12px;
}
.calculation-actions {
    grid-column: 1;
    border-top: 0;
    padding: 2px 4px 0;
    background: transparent;
}
@media (max-width: 520px) {
    .app.has-started .intro,
    .app:not(.has-started) .intro {
        margin-bottom: 22px;
    }
    .step[data-step="hours"] .numeric-row,
    .step[data-step="rate"] .numeric-row {
        grid-template-columns: minmax(0, min(190px, 100%));
    }
    .result-hero__meta span {
        min-height: 44px;
        padding-inline: 10px;
        font-size: 0.82rem;
    }
    .result-deductions__row {
        padding: 11px 13px;
        column-gap: 10px;
    }
    .result-deductions__row > span {
        gap: 9px;
        font-size: 0.82rem;
    }
    .result-deductions__row > strong {
        min-width: 88px;
        font-size: 0.86rem;
    }
    .calculation-body {
        padding: 10px;
        gap: 10px;
    }
    .calc-step {
        padding: 15px;
    }
    .calc-step__heading-row,
    .deduction-list,
    .tax-summary {
        column-gap: 12px;
    }
}
.step[data-step="hours"] .numeric-row,
.step[data-step="rate"] .numeric-row {
    grid-template-columns: minmax(0, 168px);
}
.step[data-step="hours"] .field-group,
.step[data-step="hours"] .input-shell,
.step[data-step="hours"] .numeric-row .button,
.step[data-step="rate"] .field-group,
.step[data-step="rate"] .input-shell,
.step[data-step="rate"] .numeric-row .button {
    max-width: 168px;
}
#hoursShell,
#rateShell {
    width: 168px;
    min-width: 168px;
    max-width: 168px;
    justify-content: center;
}
#hoursShell .number-input,
#rateShell .number-input {
    text-align: center;
}
.intro {
    display: block;
    overflow: hidden;
    transition:
        max-height 0.22s var(--ease),
        margin 0.22s var(--ease),
        opacity 0.18s ease,
        transform 0.22s var(--ease);
}
.app:not(.has-started) .intro {
    max-height: 120px;
    margin: 0 auto 26px;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.app.has-started .intro {
    display: block;
    max-height: 0;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(-7px);
    pointer-events: none;
}
.result-hero__meta,
.result-hero__totals {
    width: min(100%, 600px);
}
.result-hero__meta span {
    white-space: nowrap;
}
.result-hero__meta span + span {
    border-top: 0;
    border-left: 1px solid rgba(22, 101, 52, 0.14);
}
.result-hero__total {
    display: flex;
    min-height: 58px;
    flex-direction: row;
    padding: 10px 14px;
}
.result-hero__total span,
.result-hero__total strong {
    white-space: nowrap;
}
.result-deductions__row > span {
    column-gap: 11px;
}
@media (max-width: 520px) {
    .step[data-step="hours"] .numeric-row,
    .step[data-step="rate"] .numeric-row {
        grid-template-columns: minmax(0, min(168px, 100%));
    }
    #hoursShell,
    #rateShell {
        width: 168px;
        min-width: 168px;
        max-width: min(168px, 100%);
    }
    .app:not(.has-started) .intro {
        margin-bottom: 22px;
    }
    .result-hero__meta span {
        padding-inline: 8px;
        font-size: 0.78rem;
    }
    .result-hero__total {
        flex-direction: column;
        gap: 2px;
        padding-inline: 8px;
        text-align: center;
    }
    .result-hero__total span {
        font-size: 0.75rem;
    }
    .result-hero__total strong {
        font-size: 0.9rem;
    }
}
.intro h1 {
    color: #6b7280;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: 0.01em;
}
.app:not(.has-started) .intro {
    width: min(100%, 430px);
    margin-bottom: 14px;
}
#hoursTitle {
    margin-bottom: 22px;
    font-size: clamp(1.78rem, 5.4vw, 2.2rem);
    font-weight: 700;
    line-height: 1.14;
    letter-spacing: -0.035em;
    text-align: center;
}
.result-hero {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
    overflow: visible;
}
.result-hero:before {
    display: none;
}
.result-hero__primary {
    position: relative;
    padding: 30px 24px 28px;
    border: 0;
    border-radius: 22px;
    background:
        radial-gradient(circle at 50% -120px, rgba(34, 197, 94, 0.1), transparent 290px),
        linear-gradient(180deg, #f2fcf6, #ecf9f1);
    overflow: hidden;
}
.result-hero__primary > * {
    position: relative;
    z-index: 1;
}
.result-hero__meta,
.result-hero__totals {
    width: 100%;
    max-width: none;
    background: transparent;
}
.result-hero__meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0 0;
    padding: 0 4px;
}
.result-hero__meta span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 42px;
    padding: 6px 10px;
    border: 0;
    color: #526077;
    font-size: 0.86rem;
    white-space: normal;
    text-align: center;
}
.result-hero__meta span + span {
    border: 0;
}
.result-hero__totals {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
    padding: 12px 4px 0;
    border: 0;
    border-top: 1px solid #edf1f5;
    border-radius: 0;
    overflow: visible;
}
.result-hero__total {
    display: grid;
    grid-template-columns: minmax(0, auto) max-content;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 0;
    min-height: 46px;
    padding: 6px 10px;
    border: 0;
    color: #526077;
    text-align: center;
}
.result-hero__total + .result-hero__total {
    border: 0;
}
.result-hero__total span,
.result-hero__total strong {
    white-space: normal;
}
.result-hero__total strong {
    color: #263247;
    font-weight: 650;
    white-space: nowrap;
}
.result-deductions {
    margin-top: 18px;
    padding: 0 4px;
    border: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
    overflow: visible;
}
.result-deductions__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    min-height: 58px;
    padding: 10px 4px;
    column-gap: 18px;
}
.result-deductions__row + .result-deductions__row {
    border-top: 1px solid #edf1f5;
}
.result-deductions__row > span {
    position: static;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: center;
    gap: 11px;
    line-height: 1.35;
}
.result-deductions__row > span:before {
    position: static;
    width: 28px;
    height: 28px;
    transform: none;
}
.result-deductions__row > strong {
    min-width: 104px;
    color: #4b5563;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
}
.methodology,
.salary-calculation {
    border: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
}
.calculation-body,
.methodology > summary,
.salary-calculation > summary {
    border-top: 1px solid #edf1f5;
}
.calculation-body {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0 4px 12px;
}
.calc-step {
    min-height: 0;
    padding: 18px 4px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
.calc-step + .calc-step {
    border: 0;
    border-top: 1px solid #edf1f5;
}
.calculation-actions {
    padding: 6px 0 0;
}
@media (max-width: 520px) {
    .app:has(.wizard:not([hidden])).has-started {
        padding-top: max(62px, calc(env(safe-area-inset-top) + 50px));
    }
    .wizard {
        overflow: visible;
    }
    .step.is-active .back-link {
        position: absolute;
        top: -50px;
        left: 2px;
        z-index: 5;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        margin: 0;
        padding: 0;
        border: 0;
        border-radius: 12px;
        background: transparent;
        color: #4b5563;
        font-size: 0;
        line-height: 1;
    }
    .step.is-active .back-link:before {
        content: "←";
        font-size: 1.35rem;
        font-weight: 600;
    }
    .step.is-active .back-link:focus-visible,
    .step.is-active .back-link:hover {
        background: hsla(0, 0%, 100%, 0.72);
        color: var(--primary);
    }
    .choice-navigation {
        min-height: 0;
        margin-top: 0;
        justify-content: center;
    }
    .choice-navigation:has(.resume-button:not([hidden])) {
        min-height: 42px;
        margin-top: 14px;
    }
    .intro h1 {
        font-size: 0.84rem;
    }
    #hoursTitle {
        font-size: clamp(1.68rem, 8vw, 2rem);
    }
    .result-hero__primary {
        padding: 28px 16px 25px;
        border-radius: 20px;
    }
    .result-hero__meta,
    .result-hero__totals {
        gap: 6px;
        padding-right: 0;
        padding-left: 0;
    }
    .result-hero__meta span {
        padding-inline: 5px;
        font-size: 0.77rem;
        line-height: 1.35;
    }
    .result-hero__total {
        grid-template-columns: 1fr;
        gap: 2px;
        padding-inline: 5px;
    }
    .result-hero__total span {
        font-size: 0.74rem;
    }
    .result-hero__total strong {
        font-size: 0.88rem;
    }
    .result-deductions {
        padding: 0;
    }
    .result-deductions__row {
        padding: 11px 2px;
        column-gap: 10px;
    }
    .result-deductions__row > span {
        grid-template-columns: 27px minmax(0, 1fr);
        gap: 9px;
        font-size: 0.81rem;
    }
    .result-deductions__row > span:before {
        width: 27px;
        height: 27px;
    }
    .result-deductions__row > strong {
        min-width: 86px;
        font-size: 0.84rem;
    }
    .calculation-body {
        padding-inline: 2px;
    }
    .calc-step {
        padding: 16px 2px;
    }
}
.result-hero__stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    margin-top: 18px;
    background: #fff;
}
.result-hero__meta,
.result-hero__totals {
    display: contents;
}
.result-hero__meta span,
.result-hero__total {
    display: flex;
    min-width: 0;
    min-height: 68px;
    margin: 0;
    padding: 10px 16px;
    border: 0;
    border-radius: 0;
    background: transparent;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #526077;
    text-align: center;
}
.result-hero__meta span {
    flex-wrap: wrap;
    font-size: 0.84rem;
    line-height: 1.4;
}
.result-hero__total {
    flex-direction: column;
    gap: 3px;
}
.result-hero__meta span + span,
.result-hero__total,
.result-hero__total + .result-hero__total {
    border-left: 1px solid #edf1f5;
}
.result-hero__meta strong,
.result-hero__total strong {
    color: #263247;
    font-weight: 650;
    white-space: nowrap;
}
.result-hero__total span {
    color: #6b7280;
    font-size: 0.78rem;
    line-height: 1.35;
}
.result-hero__total strong {
    font-size: 0.94rem;
}
.result-deductions__row > strong.is-zero {
    color: #a8b0bd;
    font-weight: 400;
}
.result-actions {
    display: flex;
    width: 100%;
    min-height: 0;
    margin-top: 18px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.result-actions > span[aria-hidden="true"] {
    display: none;
}
#openParametersButton {
    width: min(100%, 340px);
    min-height: 48px;
    padding: 0 20px;
    border: 1px solid var(--primary);
    border-radius: 14px;
    background: var(--primary);
    color: #fff;
    font-size: 0.92rem;
    font-weight: 650;
    box-shadow: none;
}
#openParametersButton:focus-visible,
#openParametersButton:hover {
    border-color: var(--primary-strong);
    background: var(--primary-strong);
    color: #fff;
}
#resetButton {
    min-height: 36px;
    padding: 0 8px;
    color: #6b7280;
    font-size: 0.86rem;
    font-weight: 550;
}
#resetButton:focus-visible,
#resetButton:hover {
    color: var(--primary);
}
@media (max-width: 640px) {
    .result-hero__stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .result-hero__meta span,
    .result-hero__total {
        min-height: 64px;
        padding: 10px 8px;
    }
    .result-hero__total {
        border-top: 1px solid #edf1f5;
    }
    .result-hero__total:first-child {
        border-left: 0;
    }
    .result-hero__meta span {
        font-size: 0.78rem;
    }
    .result-hero__total span {
        font-size: 0.74rem;
    }
    .result-hero__total strong {
        font-size: 0.88rem;
    }
    .result-hero__meta span,
    .result-hero__total {
        min-height: 66px;
        border: 0 !important;
    }
    .result-hero__meta span:nth-child(2),
    .result-hero__total:nth-child(2) {
        border-left: 1px solid #e5e9ef !important;
    }
    .result-hero__total {
        border-top: 1px solid #e5e9ef !important;
    }
}
.result-deductions__row {
    grid-template-columns: 28px minmax(0, 1fr) max-content;
    align-items: center;
    column-gap: 11px;
}
.result-deductions__row:before {
    content: "";
    grid-column: 1;
    grid-row: 1;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #eff4ff;
    background-repeat: no-repeat;
    background-position: 50%;
    background-size: 15px 15px;
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.06);
}
.result-deductions__row:first-child:before {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%232563eb' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.8' viewBox='0 0 24 24'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M22 21v-2a4 4 0 0 0-3-3.87m-3-12a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E");
}
.result-deductions__row:nth-child(2):before {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%232563eb' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.8' viewBox='0 0 24 24'%3E%3Cpath d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78L12 21.23l8.84-8.84a5.5 5.5 0 0 0 0-7.78'/%3E%3C/svg%3E");
}
.result-deductions__row:nth-child(3):before {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%232563eb' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.8' viewBox='0 0 24 24'%3E%3Cpath d='M19 5 5 19'/%3E%3Ccircle cx='6.5' cy='6.5' r='2.5'/%3E%3Ccircle cx='17.5' cy='17.5' r='2.5'/%3E%3C/svg%3E");
}
.result-deductions__row > span {
    display: block;
    grid-column: 2;
    min-width: 0;
    padding: 0;
}
.result-deductions__row > span:before {
    content: none !important;
    display: none !important;
}
.result-deductions__label {
    display: block;
    min-width: 0;
    line-height: 1.35;
}
.result-deductions__row > strong {
    grid-column: 3;
    min-width: 96px;
    justify-self: end;
    text-align: right;
}
.calculation-body {
    gap: 10px;
    padding: 12px 4px 14px;
    background: #fff;
}
.calc-step,
.calc-step + .calc-step {
    min-height: 0;
    padding: 16px;
    border: 0;
    border-radius: 14px;
    background: #f6f7f9;
    box-shadow: none;
}
.calc-step__index {
    margin-bottom: 9px;
}
.calc-step h3 {
    color: #263247;
    font-size: 0.96rem;
    font-weight: 700;
    line-height: 1.35;
}
.calc-note,
.calc-step__text {
    margin-top: 8px;
    color: #6b7280;
    font-size: 0.78rem;
    line-height: 1.5;
}
.deduction-list,
.tax-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    width: 100%;
    margin: 12px 0 0;
    padding: 0;
    column-gap: 16px;
    border-radius: 0;
    background: transparent;
}
.deduction-line > span,
.deduction-line > strong,
.tax-line > span,
.tax-line > strong {
    min-height: 36px;
    font-size: 0.78rem;
    line-height: 1.4;
}
.deduction-line > strong,
.tax-line > strong {
    justify-content: flex-end;
    color: #374151;
    text-align: right;
    white-space: nowrap;
}
.deduction-total > span,
.deduction-total > strong,
.tax-line--total > span,
.tax-line--total > strong {
    margin-top: 5px;
    padding-top: 10px;
    border-top: 1px solid #dfe4ea;
    color: #263247;
    font-weight: 700;
}
.calc-step__heading-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    align-items: center;
    width: 100%;
    margin: 0;
    padding: 0;
    column-gap: 16px;
    row-gap: 0;
    border-radius: 0;
    background: transparent;
}
.calc-step__heading-row h3 {
    width: auto;
    min-width: 0;
}
.calc-step__heading-row .deduction-amount {
    width: auto;
    margin: 0;
    color: #374151;
    font-size: 0.96rem;
    font-weight: 650;
    text-align: right;
    white-space: nowrap;
}
.tax-explanation {
    margin-top: 12px;
    padding-top: 0;
}
@media (max-width: 520px) {
    .result-deductions__row {
        grid-template-columns: 27px minmax(0, 1fr) max-content;
        column-gap: 9px;
    }
    .result-deductions__row:before {
        width: 27px;
        height: 27px;
    }
    .result-deductions__row > strong {
        min-width: 84px;
    }
    .calculation-body {
        gap: 8px;
        padding-inline: 0;
    }
    .calc-step,
    .calc-step + .calc-step {
        padding: 14px 12px;
        border-radius: 12px;
    }
    .calc-step__heading-row,
    .deduction-list,
    .tax-summary {
        column-gap: 12px;
    }
}

/* Audited 2026 calculation scenarios. Existing visual system is preserved. */
.multi-input-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.input-label {
    display: block;
    margin: 0 0 7px;
    color: var(--text-secondary);
    font-size: .82rem;
    font-weight: 650;
    line-height: 1.35;
}

.input-shell--with-suffix,
.input-shell--money {
    width: 100%;
    justify-content: center;
}

.number-input--compact {
    width: 4.2ch !important;
    min-width: 4.2ch;
    max-width: 4.2ch;
    text-align: center;
}

.number-input--annual {
    width: 8.5ch !important;
    min-width: 8.5ch;
    max-width: 8.5ch;
    font-size: 1.22rem;
    text-align: right;
}

.choice-navigation--form {
    margin-top: 18px;
}

.annual-input-list {
    display: grid;
    gap: 4px;
    margin-top: 16px;
}

.annual-input-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(155px, max-content);
    align-items: center;
    gap: 16px;
    padding: 13px 0;
    border-bottom: 1px solid var(--border);
}

.annual-input-row:first-child {
    border-top: 1px solid var(--border);
}

.annual-input-row > label {
    display: grid;
    gap: 3px;
    min-width: 0;
    color: var(--text);
    font-size: .9rem;
    font-weight: 650;
    line-height: 1.35;
}

.annual-input-row > label small {
    color: var(--text-muted);
    font-size: .75rem;
    font-weight: 450;
    line-height: 1.4;
}

.annual-input-row .field-message {
    max-width: 180px;
    margin-left: auto;
    text-align: right;
}

.single-input-block {
    display: grid;
    justify-items: center;
    margin-top: 18px;
}

.result-deductions__row:nth-child(4):before,
.result-deductions__row:nth-child(5):before {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%232563eb' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.8' viewBox='0 0 24 24'%3E%3Cpath d='M12 2v20M17 5H9.5a3.5 3.5 0 0 0 0 7H14a3.5 3.5 0 0 1 0 7H6'/%3E%3C/svg%3E");
}

.result-deductions__row--benefit:before {
    background-color: #edf9f2;
    box-shadow: inset 0 0 0 1px rgba(23, 99, 58, .08);
}

.result-deductions__row--benefit > strong {
    color: var(--success);
}

.calc-step--ppk .deduction-total > span,
.calc-step--ppk .deduction-total > strong {
    border-top-color: #d9e7df;
}

.calculation-alert {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--warning-soft);
    color: #6d410e;
    font-size: .76rem;
    line-height: 1.45;
}

.calculation-alert--neutral {
    background: var(--primary-soft);
    color: var(--primary-strong);
}

.calc-step__subnote {
    margin: 7px 0 0;
    color: var(--text-muted);
    font-size: .72rem;
    line-height: 1.45;
}

@media (max-width: 520px) {
    .multi-input-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .annual-input-row {
        grid-template-columns: 1fr;
        gap: 9px;
        padding: 13px 0 15px;
    }

    .annual-input-row > div,
    .annual-input-row .input-shell--money {
        width: 100%;
    }

    .annual-input-row .field-message {
        max-width: none;
        margin-left: 0;
        text-align: left;
    }

    .number-input--annual {
        width: min(8.5ch, calc(100% - 38px)) !important;
        min-width: 0;
        max-width: none;
    }
}


/* Targeted UX fixes: detailed NFZ amount matches the other calculation totals. */
.calc-step--health .calc-step__heading-row .deduction-amount {
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.35;
    text-align: right;
}

/* Result-screen clarity: uniform summary stats and progressive tax disclosure. */
.result-hero__stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    margin-top: 18px;
    background: #fff;
}

.result-stat {
    display: flex;
    min-width: 0;
    min-height: 68px;
    padding: 10px 14px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 3px;
    color: #526077;
    text-align: center;
}

.result-stat + .result-stat {
    border-left: 1px solid #edf1f5;
}

.result-stat__value {
    color: #263247;
    font-size: .94rem;
    font-weight: 650;
    line-height: 1.35;
    white-space: nowrap;
}

.result-stat__label,
.result-stat--hours::after {
    min-height: 1.35em;
    color: #6b7280;
    font-size: .78rem;
    line-height: 1.35;
}

.result-stat--hours::after {
    content: "";
    display: block;
}

.result-stat__value--hours {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    gap: .25em;
}

.tax-explanation {
    margin-top: 12px;
}

.tax-explanation > summary {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    color: var(--primary);
    font-size: .78rem;
    font-weight: 650;
    cursor: pointer;
    list-style: none;
}

.tax-explanation > summary::-webkit-details-marker {
    display: none;
}

.tax-explanation > summary::after {
    content: "⌄";
    margin-left: 7px;
    color: var(--text-muted);
    transition: transform var(--transition);
}

.tax-explanation[open] > summary::after {
    transform: rotate(180deg);
}

.tax-explanation__body.tax-details-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    width: 100%;
    margin-top: 8px;
    padding: 10px 12px;
    column-gap: 14px;
    border-radius: 10px;
    background: #eef1f5;
}

.tax-details-grid .deduction-line {
    display: contents;
}

.tax-details-grid .deduction-line > span,
.tax-details-grid .deduction-line > strong {
    display: flex;
    min-height: 32px;
    align-items: center;
    font-size: .75rem;
    line-height: 1.4;
}

.tax-details-grid .deduction-line > span {
    color: #6b7280;
}

.tax-details-grid .deduction-line > strong {
    justify-content: flex-end;
    color: #4b5563;
    font-weight: 600;
    text-align: right;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .result-hero__stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .result-stat {
        min-height: 66px;
        padding: 9px 8px;
        border: 0;
    }

    .result-stat:nth-child(even) {
        border-left: 1px solid #e5e9ef;
    }

    .result-stat:nth-child(n + 3) {
        border-top: 1px solid #e5e9ef;
    }

    .result-stat__value {
        font-size: .88rem;
    }

    .result-stat__label,
    .result-stat--hours::after {
        font-size: .74rem;
    }

    .tax-explanation__body.tax-details-grid {
        column-gap: 10px;
        padding-inline: 10px;
    }
}

/* Final UX route: combined work inputs and result-side optional refinements. */
.work-inputs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    width: min(100%, 430px);
    margin: 20px auto 18px;
}

.work-inputs .field-group {
    display: grid;
    justify-items: center;
    align-content: start;
    min-width: 0;
}

.work-inputs .input-label {
    min-height: 2.7em;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: .84rem;
    font-weight: 650;
    line-height: 1.35;
    text-align: center;
}

.work-inputs .input-shell {
    width: 156px;
    justify-content: center;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px transparent;
}

.work-inputs .input-shell:focus-within {
    transform: none;
    box-shadow: inset 0 0 0 2px rgba(37, 99, 235, .13);
}

.work-inputs .number-input {
    width: 100% !important;
    min-width: 0;
    max-width: none;
    text-align: center;
}

.work-continue {
    width: min(100%, 330px);
    margin: 0 auto;
    display: block;
}

.choice-card--compact {
    min-height: 48px;
    padding-block: 11px;
}

.pit2-split-link {
    display: block;
    margin: 12px 0 0;
}

.result-refinement {
    width: 100%;
    margin-top: 14px;
    padding: 18px 20px;
    border-radius: 18px;
    background: #fff;
}

.result-refinement h2 {
    margin: 0;
    color: #1b2943;
    font-size: 1.02rem;
    line-height: 1.35;
}

.result-refinement__intro {
    margin: 5px 0 14px;
    color: var(--text-muted);
    font-size: .8rem;
    line-height: 1.45;
}

.refinement-option {
    padding: 14px 0;
    border-top: 1px solid #edf1f5;
}

.toggle-row {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    cursor: pointer;
}

.toggle-row > input {
    appearance: none;
    position: relative;
    width: 42px;
    height: 24px;
    margin: 1px 0 0;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #e5e7eb;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition);
}

.toggle-row > input::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(15, 23, 42, .22);
    transition: transform var(--transition);
}

.toggle-row > input:checked {
    border-color: var(--primary);
    background: var(--primary);
}

.toggle-row > input:checked::after {
    transform: translateX(18px);
}

.toggle-row > input:focus-visible {
    outline: 3px solid rgba(37, 99, 235, .18);
    outline-offset: 2px;
}

.toggle-row strong,
.toggle-row small {
    display: block;
}

.toggle-row strong {
    color: var(--text);
    font-size: .9rem;
    line-height: 1.4;
}

.toggle-row small {
    margin-top: 3px;
    color: var(--text-muted);
    font-size: .75rem;
    line-height: 1.4;
}

.refinement-option > .info-link {
    margin: 7px 0 0 56px;
}

.ppk-custom-result {
    margin: 12px 0 0 56px;
}

.ppk-custom-result > summary {
    color: var(--primary);
    font-size: .8rem;
    font-weight: 650;
    cursor: pointer;
    list-style: none;
}

.ppk-custom-result > summary::-webkit-details-marker {
    display: none;
}

.ppk-custom-result__body {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
    padding: 14px;
    border-radius: 12px;
    background: var(--surface-muted);
}

.ppk-custom-result__body .field-group {
    min-width: 0;
}

.ppk-custom-result__body .input-shell {
    width: 100%;
}

.ppk-custom-result__body .button {
    grid-column: 1 / -1;
}

/* Keep every result statistic visually equal. */
.result-stat,
.result-stat--hours {
    min-height: 70px;
    gap: 3px;
}

.result-stat__value--hours {
    flex-wrap: nowrap;
    white-space: nowrap;
}

.calc-step--health .calc-step__heading-row .deduction-amount {
    font-size: .82rem;
    font-weight: 700;
}

@media (max-width: 520px) {
    .work-inputs {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .work-inputs .input-shell {
        width: 100%;
        min-width: 0;
    }

    .work-inputs .input-label {
        min-height: 3.8em;
        font-size: .78rem;
    }

    .result-refinement {
        padding: 16px 14px;
    }

    .refinement-option > .info-link,
    .ppk-custom-result {
        margin-left: 0;
    }

    .ppk-custom-result__body {
        grid-template-columns: 1fr;
    }

    .ppk-custom-result__body .button {
        grid-column: auto;
    }
}

.result-precision-link {
    display: flex;
    justify-content: center;
    margin-top: 14px;
    padding: 4px 0;
}

.context-note.context-note--neutral {
    border-color: #dbe4ef;
    background: #f7f9fc;
}

.context-note.context-note--neutral p {
    color: var(--text-secondary);
}

/* Result refinements v2: shorter main route and neutral start screen. */
.intro h1 {
    color: #0f1e3a;
    font-size: clamp(1.38rem, 4.6vw, 1.78rem);
    font-weight: 700;
    line-height: 1.18;
    letter-spacing: -.025em;
    text-align: center;
}

.app:not(.has-started) .intro {
    width: min(100%, 460px);
    margin-bottom: 18px;
}

.work-inputs {
    margin-top: 0;
}

#otherJobRefinement {
    padding-top: 0;
    border-top: 0;
}

.calc-step--ppk .tax-explanation__body {
    display: block;
    color: var(--text-muted);
    font-size: .76rem;
    line-height: 1.5;
}

@media (max-width: 520px) {
    .intro h1 {
        font-size: clamp(1.3rem, 7vw, 1.58rem);
    }

    .work-inputs {
        grid-template-columns: 1fr;
        gap: 12px;
        width: min(100%, 260px);
    }

    .work-inputs .input-label {
        min-height: 0;
    }
}

/* Final UX v3: clearer start, compact PIT-2, and concise result refinements. */
@media (min-width: 521px) {
    .app:not(.has-started) .wizard {
        justify-content: flex-start;
        padding-top: clamp(46px, 7vh, 68px);
    }

    .app:not(.has-started) .intro {
        width: min(100%, 500px);
        margin-bottom: 42px;
    }

    .app:not(.has-started) .intro h1 {
        font-size: clamp(3rem, 6.4vw, 3.5rem);
        line-height: 1.03;
        letter-spacing: -.045em;
    }

    .work-inputs {
        gap: 20px;
    }

    .work-continue {
        margin-top: 26px;
    }
}

.pit2-choice-list {
    gap: 10px;
}

.choice-card--compound {
    display: block;
    padding: 0;
    overflow: hidden;
}

.choice-card--compound:hover {
    transform: none;
}

.choice-card--compound:has(.choice-card__select > input:checked) {
    border-color: var(--primary);
    background: var(--primary-soft);
    box-shadow: inset 0 0 0 2px rgba(37, 99, 235, .09);
}

.choice-card__select {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    align-items: center;
    gap: 11px;
    min-height: 58px;
    padding: 14px;
    cursor: pointer;
}

.choice-card__select > input {
    width: 19px;
    height: 19px;
    margin: 0;
    accent-color: var(--primary);
}

.pit2-inline-setting {
    padding: 15px 16px 16px 45px;
    border-top: 1px solid rgba(37, 99, 235, .12);
    background: rgba(255, 255, 255, .56);
}

.compact-check {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    color: var(--text-secondary);
    font-size: .84rem;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
}

.compact-check > input {
    width: 17px;
    height: 17px;
    margin: 1px 0 0;
    accent-color: var(--primary);
}

.pit2-split-options {
    margin-top: 16px;
}

.pit2-split-options__label {
    margin: 0 0 10px;
    color: var(--text);
    font-size: .84rem;
    font-weight: 700;
}

.pit2-navigation {
    margin-top: 36px;
}

.result-refinement {
    padding: 17px 20px;
}

.result-refinement__intro {
    margin: 5px 0 10px;
    font-size: .78rem;
}

.refinement-option {
    padding: 12px 0;
}

.refinement-option__header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 30px;
    align-items: start;
    gap: 10px;
}

.refinement-info-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    transition: color var(--transition), background var(--transition);
}

.refinement-info-button:hover,
.refinement-info-button[aria-expanded="true"] {
    background: var(--primary-soft);
    color: var(--primary);
}

.refinement-info-button:focus-visible {
    outline: 3px solid rgba(37, 99, 235, .18);
    outline-offset: 2px;
}

.refinement-disclosure,
.refinement-option__effect {
    margin-left: 56px;
}

.refinement-disclosure.is-open {
    margin-top: 9px;
}

.refinement-option__effect {
    margin-top: 7px;
    margin-bottom: 0;
    color: var(--text-secondary);
    font-size: .78rem;
    font-weight: 700;
    line-height: 1.4;
}

.refinement-option__effect.is-positive {
    color: var(--success);
}

.refinement-option__effect.is-negative {
    color: #8a4b08;
}

.refinement-option__effect.is-neutral {
    color: var(--text-muted);
}

.ppk-custom-result > summary {
    font-size: .78rem;
}

.result-precision-link {
    margin-top: 16px;
}

@media (max-width: 520px) {
    .app:not(.has-started) .wizard {
        justify-content: flex-start;
        padding-top: 34px;
    }

    .app:not(.has-started) .intro {
        margin-bottom: 32px;
    }

    .app:not(.has-started) .intro h1,
    .intro h1 {
        font-size: clamp(2rem, 9.2vw, 2.35rem);
        line-height: 1.06;
        letter-spacing: -.04em;
    }

    .work-continue {
        margin-top: 22px;
    }

    .pit2-inline-setting {
        padding-left: 15px;
    }

    .pit2-navigation {
        margin-top: 32px;
    }

    .result-refinement {
        padding: 15px 14px;
    }

    .refinement-option__header {
        grid-template-columns: minmax(0, 1fr) 28px;
        gap: 7px;
    }

    .refinement-disclosure,
    .refinement-option__effect,
    .ppk-custom-result {
        margin-left: 0;
    }
}


/* Final UX v4: optional gross input and compact trust information. */
.input-mode-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(100%, 430px);
    margin: 0 auto 26px;
    padding: 4px;
    border-radius: 14px;
    background: var(--surface-muted);
}

.input-mode-switch__button {
    min-height: 42px;
    padding: 8px 12px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: var(--text-secondary);
    font-size: .86rem;
    font-weight: 650;
    cursor: pointer;
    transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}

.input-mode-switch__button.is-active {
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 2px 8px rgba(15, 23, 42, .08);
}

.input-label-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.inline-info-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--text-muted);
    font-size: .86rem;
    cursor: pointer;
}

.inline-info-button:hover,
.inline-info-button[aria-expanded="true"] { color: var(--primary); background: var(--primary-soft); }

.start-info-disclosure {
    width: min(100%, 430px);
    margin: -15px auto 18px;
}

.start-info-disclosure.is-open { margin-top: -8px; }

.work-inputs--gross {
    grid-template-columns: minmax(0, 220px);
    justify-content: center;
}

.number-input--gross { width: 8ch; max-width: 10ch; }

.result-hero__stats.is-gross-input {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 430px;
}

.result-hero__stats.is-gross-input .result-stat:nth-child(3) { border-left: 0; }

.calculation-trust {
    display: grid;
    gap: 3px;
    margin: 18px auto 0;
    color: var(--text-muted);
    text-align: center;
}

.calculation-trust strong { color: var(--text-secondary); font-size: .82rem; font-weight: 650; }
.calculation-trust small { font-size: .76rem; line-height: 1.4; }
.methodology__body h3 { margin: 16px 0 8px; color: var(--text); font-size: .86rem; }
.methodology__sources a { color: var(--primary); text-decoration: none; }
.methodology__sources a:hover { text-decoration: underline; }

@media (max-width: 520px) {
    .input-mode-switch { margin-bottom: 22px; }
    .input-mode-switch__button { min-height: 44px; font-size: .8rem; }
    .work-inputs--gross { grid-template-columns: 1fr; }
    .result-hero__stats.is-gross-input { grid-template-columns: 1fr 1fr; }
}

.result-input-mode-note {
    margin: 12px 0 0;
    color: var(--text-muted);
    font-size: .78rem;
    text-align: center;
}

/* Final UX v5: persistent option impacts, clear disclosures, and balanced summary cards. */
@media (min-width: 521px) {
    .app:not(.has-started) .intro {
        margin-bottom: 48px;
    }

    .app:not(.has-started) .intro h1 {
        font-size: clamp(3.1rem, 6.2vw, 3.5rem);
    }
}

@media (max-width: 520px) {
    .app:not(.has-started) .intro {
        margin-bottom: 36px;
    }

    .app:not(.has-started) .intro h1,
    .intro h1 {
        font-size: clamp(2rem, 9vw, 2.35rem);
    }
}

.result-hero__stats {
    width: min(100%, 650px);
    margin: 20px auto 0;
    border: 1px solid #e1e7ef;
    border-radius: 14px;
    background: #f7f9fc;
    overflow: hidden;
}

.result-stat {
    min-height: 78px;
    padding: 12px 13px;
    gap: 3px;
}

.result-stat__value {
    color: #263247;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.25;
}

.result-stat__label {
    min-height: 0;
    margin-top: 1px;
    font-size: .76rem;
    line-height: 1.3;
}

.result-stat--hours::after {
    content: none;
}

.result-stat + .result-stat {
    border-left-color: #e1e7ef;
}

.refinement-option__header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
}

.refinement-option__copy {
    min-width: 0;
}

.refinement-option__copy strong,
.refinement-option__copy small {
    display: block;
}

.refinement-option__copy strong {
    color: var(--text);
    font-size: .9rem;
    line-height: 1.4;
}

.refinement-option__copy small {
    margin-top: 3px;
    color: var(--text-muted);
    font-size: .75rem;
    line-height: 1.4;
}

.refinement-option__controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
    min-width: max-content;
}

.refinement-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.refinement-toggle > input {
    appearance: none;
    position: relative;
    width: 42px;
    height: 24px;
    margin: 0;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #e5e7eb;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition);
}

.refinement-toggle > input::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(15, 23, 42, .22);
    transition: transform var(--transition);
}

.refinement-toggle > input:checked {
    border-color: var(--primary);
    background: var(--primary);
}

.refinement-toggle > input:checked::after {
    transform: translateX(18px);
}

.refinement-toggle > input:focus-visible {
    outline: 3px solid rgba(37, 99, 235, .18);
    outline-offset: 2px;
}

.refinement-option__effect {
    margin: 0;
    font-size: .76rem;
    font-weight: 750;
    line-height: 1.25;
    white-space: nowrap;
}

.refinement-disclosure,
.ppk-custom-result {
    margin-left: 0;
}

.refinement-disclosure.is-open {
    margin-top: 10px;
}

.details-summary {
    display: flex !important;
    width: 100%;
    min-height: 52px;
    padding: 13px 16px !important;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-radius: 12px;
    color: var(--text);
    cursor: pointer;
    list-style: none;
    transition: background var(--transition), color var(--transition);
}

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

.details-summary::after,
.salary-calculation > summary.details-summary::after,
.methodology > summary.details-summary::after,
.tax-explanation > summary.details-summary::after,
.ppk-custom-result > summary.details-summary::after {
    content: none !important;
}

.details-summary:hover,
.details-summary:focus-visible {
    background: #f4f7fb;
}

.details-summary:focus-visible {
    outline: 3px solid rgba(37, 99, 235, .16);
    outline-offset: -2px;
}

.details-summary__title {
    min-width: 0;
    font-weight: 700;
    line-height: 1.35;
}

.details-summary__action {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 9px;
    color: var(--primary);
    font-size: .8rem;
    font-weight: 650;
    white-space: nowrap;
}

.details-summary__chevron {
    position: relative;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

.details-summary__chevron::before {
    content: "";
    position: absolute;
    top: 4px;
    left: 5px;
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform var(--transition), top var(--transition);
}

details[open] > .details-summary .details-summary__chevron::before {
    top: 7px;
    transform: rotate(225deg);
}

.details-summary--compact {
    min-height: 44px;
    padding: 8px 10px !important;
}

.details-summary--compact .details-summary__title,
.details-summary--compact .details-summary__action {
    font-size: .76rem;
}

.tax-explanation > summary.details-summary {
    color: var(--primary);
}

.salary-calculation > summary.details-summary,
.methodology > summary.details-summary {
    border-radius: 16px;
}

@media (max-width: 640px) {
    .result-stat {
        min-height: 72px;
        padding: 10px 8px;
    }

    .result-stat:nth-child(even) {
        border-left-color: #e1e7ef;
    }

    .result-stat:nth-child(n + 3) {
        border-top-color: #e1e7ef;
    }

    .refinement-option__header {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 9px;
    }

    .refinement-option__controls {
        display: grid;
        grid-template-columns: 42px 28px;
        gap: 7px;
    }

    .refinement-option__effect {
        grid-column: 1 / -1;
        grid-row: 1;
        justify-self: end;
        margin-bottom: 2px;
    }

    .refinement-toggle {
        grid-column: 1;
        grid-row: 2;
    }

    .refinement-info-button {
        grid-column: 2;
        grid-row: 2;
    }

    .details-summary {
        min-height: 48px;
        padding: 11px 12px !important;
        gap: 10px;
    }

    .details-summary__action {
        gap: 6px;
        font-size: .74rem;
    }
}

@media (max-width: 380px) {
    .details-summary__action [data-details-label] {
        max-width: 94px;
        white-space: normal;
        text-align: right;
        line-height: 1.2;
    }
}

/* Final UX v6: targeted start, PIT-2, refinement, and accessibility corrections. */
.app:not(.has-started) .intro {
    width: min(100%, 520px);
    max-height: 150px;
    margin-bottom: 52px;
    overflow: visible;
}

.app:not(.has-started) .intro h1 {
    width: 100%;
    max-width: 520px;
    margin-inline: auto;
    font-size: clamp(3.25rem, 5.7vw, 3.55rem);
    line-height: 1.04;
    overflow-wrap: normal;
    word-break: normal;
    text-wrap: balance;
}

.input-mode-switch__button {
    line-height: 1.25;
    text-wrap: balance;
}

.input-label-row {
    min-height: 40px;
    justify-content: center;
    gap: 2px;
}

.input-label-row .input-label {
    margin: 0;
}

.inline-info-button {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    font-size: 1.12rem;
}

.start-info-disclosure,
.start-info-disclosure.is-open {
    width: 100%;
    margin: 8px 0 0;
}

.start-info-disclosure .disclosure__inner p {
    padding: 9px 10px;
    font-size: .76rem;
    line-height: 1.4;
    text-align: left;
}

.field-recovery-action {
    display: block;
    margin: 3px auto 0;
    padding: 4px 6px;
    border: 0;
    background: transparent;
    color: var(--primary);
    font-size: .78rem;
    font-weight: 650;
    cursor: pointer;
}

.field-recovery-action:hover {
    text-decoration: underline;
}

.pit2-choice-list {
    gap: 12px;
}

.pit2-inline-setting {
    padding-top: 20px;
    padding-bottom: 20px;
}

.pit2-navigation {
    margin-top: 38px;
}

.result-hero__primary:focus {
    outline: none;
}

.result-hero__primary:focus-visible {
    border-radius: 12px;
    outline: 3px solid rgba(22, 101, 52, .18);
    outline-offset: 5px;
}

.result-refinement h2 {
    margin: 0 0 22px;
}

.result-refinement .refinement-option + .refinement-option {
    border-top: 1px solid var(--border);
}

.refinement-option__effect {
    font-variant-numeric: tabular-nums;
}

.ppk-reduced-eligibility {
    min-width: 0;
    margin: 2px 0 12px;
    padding: 12px;
    border: 0;
    border-radius: 12px;
    background: var(--surface-muted);
}

.ppk-reduced-eligibility legend {
    margin: 0 0 10px;
    padding: 0;
    color: var(--text);
    font-size: .8rem;
    font-weight: 650;
    line-height: 1.4;
}

.ppk-reduced-eligibility__options {
    display: grid;
    gap: 8px;
}

.ppk-reduced-eligibility .compact-check {
    font-size: .78rem;
}

@media (max-width: 520px) {
    .app:not(.has-started) .intro {
        max-height: 132px;
        margin-bottom: 40px;
    }

    .app:not(.has-started) .intro h1,
    .intro h1 {
        max-width: 340px;
        font-size: clamp(2rem, 9.4vw, 2.35rem);
        line-height: 1.06;
    }

    .input-mode-switch__button {
        padding-inline: 8px;
        font-size: .76rem;
    }

    .pit2-inline-setting {
        padding-top: 18px;
        padding-bottom: 18px;
    }

    .result-refinement h2 {
        margin-bottom: 20px;
    }
}

/* Final UX v7: language switch, persistent start title, and simplified hourly-rate label. */
.wizard,
.result {
    position: relative;
}

.language-switch {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 8;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 4px 14px rgba(15, 23, 42, .06);
}

.language-switch__button {
    min-width: 34px;
    height: 30px;
    padding: 0 7px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text-muted);
    font-size: .72rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: .02em;
    cursor: pointer;
    transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}

.language-switch__button::before {
    content: attr(data-language-label);
}

.language-switch__button:hover:not(:disabled) {
    background: var(--surface-muted);
    color: var(--text);
}

.language-switch__button.is-active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 7px rgba(37, 99, 235, .22);
}

.language-switch__button:focus-visible {
    outline: 3px solid rgba(37, 99, 235, .2);
    outline-offset: 2px;
}

.language-switch__button:disabled {
    cursor: wait;
    opacity: .7;
}

.app.has-started .wizard > .language-switch {
    display: none;
}

.wizard > .language-switch + .intro {
    margin-top: 38px;
}

.result > .language-switch + .result-hero {
    margin-top: 38px;
}

/* The title is controlled only by the active screen, not by previously confirmed values. */
.app:not(.has-started) .intro {
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 520px) {
    .language-switch {
        top: 12px;
        right: 12px;
    }

    .language-switch__button {
        min-width: 31px;
        height: 29px;
        padding-inline: 5px;
        font-size: .68rem;
    }

    .wizard > .language-switch + .intro,
    .result > .language-switch + .result-hero {
        margin-top: 40px;
    }
}

/* Final UX v8: restore mobile back navigation and refine the PPK result spacing. */
@media (max-width: 520px) {
    /* The back button is positioned above the active step; the stage must not clip it. */
    .app:has(.wizard:not([hidden])).has-started .stage {
        overflow: visible;
    }

    .step.is-active .back-link {
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
    }
}

/* Remove the excessive empty area below the visible “other PPK rates” control. */
#resultRefinement:has(#resultPpkCustomDetails:not([hidden])) {
    padding-bottom: 8px;
}

#ppkRefinement:has(#resultPpkCustomDetails:not([hidden])) {
    padding-bottom: 0;
}

#resultPpkCustomDetails:not([hidden]) {
    margin-top: 6px;
}

#resultRefinement:has(#resultPpkCustomDetails:not([hidden])) ~ .result-deductions {
    margin-top: 8px;
}

/* Visually distinguish the total amount withheld from the other result stats. */
.result-stat--withheld {
    position: relative;
    background: #f3f6ff;
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .2);
}

.result-stat--withheld .result-stat__value {
    color: #1d4ed8;
}

/* Final UX v9: prevent refinement impact amounts from overlapping translated copy. */
.refinement-option__header,
.refinement-option__copy,
.refinement-option__controls,
.refinement-option__effect {
    min-width: 0;
}

.refinement-option__copy strong,
.refinement-option__copy small,
.refinement-option__effect {
    overflow-wrap: anywhere;
}

.refinement-option__effect {
    max-width: 100%;
    white-space: normal;
    text-align: right;
}

/* On medium and narrow screens the impact and controls move below the copy. */
@media (max-width: 900px) {
    .refinement-option__header {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    .refinement-option__controls {
        display: grid;
        width: 100%;
        grid-template-columns: minmax(0, 1fr) 42px 28px;
        align-items: center;
        gap: 8px;
    }

    .refinement-option__effect {
        grid-column: 1;
        grid-row: 1;
        justify-self: start;
        text-align: left;
    }

    .refinement-toggle {
        grid-column: 2;
        grid-row: 1;
    }

    .refinement-info-button {
        grid-column: 3;
        grid-row: 1;
    }
}

@media (max-width: 520px) {
    .refinement-option__effect {
        grid-column: 1 / -1;
        grid-row: 1;
        justify-self: start;
        margin-bottom: 1px;
    }

    .refinement-toggle {
        grid-column: 2;
        grid-row: 2;
    }

    .refinement-info-button {
        grid-column: 3;
        grid-row: 2;
    }
}

/* Highlight summary rows in the detailed calculation without changing card sizing. */
.deduction-list > .deduction-total,
.tax-summary > .tax-line--total {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) max-content;
    align-items: center;
    width: 100%;
    margin-top: 8px;
    padding: 10px 12px;
    column-gap: 12px;
    border-radius: 11px;
    background: #eceff3;
}

.deduction-list > .deduction-total > span,
.deduction-list > .deduction-total > strong,
.tax-summary > .tax-line--total > span,
.tax-summary > .tax-line--total > strong {
    display: block;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    color: #263247;
    font-size: .78rem;
    font-weight: 700;
    line-height: 1.4;
}

.deduction-list > .deduction-total > span,
.tax-summary > .tax-line--total > span {
    overflow-wrap: anywhere;
}

.deduction-list > .deduction-total > strong,
.tax-summary > .tax-line--total > strong {
    justify-self: end;
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* Audit fixes 2026: targeted recovery, disclosure and fallback styles only. */
.startup-error {
    width: min(92vw, 520px);
    margin: 12vh auto 0;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--shadow);
    text-align: center;
}

.startup-error h1 {
    margin: 0 0 10px;
    font-size: 1.35rem;
    line-height: 1.25;
}

.startup-error p {
    margin: 0 0 18px;
    color: var(--text-secondary);
}

.startup-error button {
    min-height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 12px;
    background: var(--primary);
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.status-info-link {
    margin-top: 9px;
}

.result-precision-link {
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 13px;
}

.result-precision-link:not([hidden]) {
    display: flex;
}

.result-precision-link > span {
    min-width: 0;
    color: var(--text-secondary);
    font-size: .82rem;
    line-height: 1.4;
}

.copy-fallback-dialog textarea {
    width: 100%;
    min-height: 240px;
    margin: 4px 0 14px;
    padding: 12px;
    resize: vertical;
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    background: var(--surface-soft);
    color: var(--text);
    font: 500 .84rem/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.copy-fallback-dialog textarea:focus {
    border-color: var(--primary);
    outline: 2px solid rgba(37, 99, 235, .18);
    outline-offset: 1px;
}

@media (max-width: 520px) {
    .result-precision-link:not([hidden]) {
        align-items: flex-start;
        flex-direction: column;
    }
}


/* Persistent calculation API error. Scoped to the requested retry block. */
.calculation-error {
    width: min(100%, 560px);
    margin: 18px auto 0;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface-soft);
    color: var(--text);
}

.calculation-error h2 {
    margin: 0 0 8px;
    font-size: 1.05rem;
    line-height: 1.3;
}

.calculation-error p {
    margin: 0 0 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.calculation-error .button {
    min-height: 44px;
}

.calculation-error:focus {
    outline: 2px solid rgba(37, 99, 235, .28);
    outline-offset: 3px;
}

@media (max-width: 360px) {
    .calculation-error {
        margin-top: 14px;
        padding: 15px;
        border-radius: 14px;
    }

    .calculation-error .button {
        width: 100%;
    }
}

/* Privacy notice and links. */
.privacy-link-row {
    color: var(--text-muted);
    font-size: .78rem;
    line-height: 1.45;
    text-align: center;
}

.privacy-link-row--start { margin-top: 18px; }
.privacy-link-row--result { margin-top: 16px; }

.privacy-link-row a,
.methodology__data-notice a {
    color: var(--primary);
    text-decoration: none;
}

.privacy-link-row a:hover { text-decoration: underline; }

.methodology__data-notice {
    margin: 14px 0 0 !important;
    padding: 11px 12px;
    border-radius: 10px;
    background: var(--surface-muted);
    line-height: 1.5;
}


/* Calculation metadata added for beta diagnostics. */
.methodology__version,
.calculation-error__diagnostics {
    display: block;
    margin: 0;
    color: var(--color-text-muted, #667085);
    font-size: 0.82rem;
    line-height: 1.45;
}

.methodology__version {
    margin-top: 0.75rem;
}

.calculation-error__diagnostics {
    margin-top: 0.5rem;
    overflow-wrap: anywhere;
}


/* Online-only calculation status. */
.network-status {
    width: min(100%, 620px);
    margin: 0 auto 14px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-soft);
    color: var(--text-secondary);
    font-size: .86rem;
    line-height: 1.45;
}

.network-status:not([hidden]) {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: .35rem;
    flex-wrap: wrap;
}

.network-status strong {
    color: var(--text);
    font-weight: 650;
}

@media (max-width: 520px) {
    .network-status {
        margin-bottom: 10px;
        padding: 9px 12px;
        text-align: center;
    }
}
