.calculator-page {
    min-height: 100vh;
}

.calculator-main {
    padding: 130px 0 6rem;
}

.calculator-intro {
    max-width: 900px;
    text-align: center;
    margin-bottom: 3rem;
}

.back-link {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    margin-bottom: 1.5rem;
}

.eyebrow {
    display: block;
    color: #d7bda2;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    margin-bottom: .65rem;
}

.calculator-intro h1 {
    color: var(--primary-color);
    font-size: clamp(2.3rem, 6vw, 4.5rem);
    line-height: 1.05;
    margin-bottom: 1rem;
}

.calculator-intro > p {
    max-width: 720px;
    margin: 0 auto;
    font-size: 1.12rem;
    color: #eadfd2;
}

.privacy-note {
    display: inline-flex;
    margin-top: 1.5rem;
    padding: .7rem 1rem;
    border: 1px solid rgba(239, 230, 216, .2);
    border-radius: 999px;
    color: #d8cfc4;
    font-size: .9rem;
}

.calculator-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 2rem;
    align-items: start;
}

.calculator-card,
.side-card,
.result-card,
.summary-card {
    background: rgba(79, 8, 20, .88);
    border: 1px solid rgba(239, 230, 216, .16);
    border-radius: 22px;
    box-shadow: 0 22px 50px rgba(0, 0, 0, .22);
}

.calculator-card {
    padding: clamp(1.4rem, 4vw, 2.5rem);
}

.card-heading {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.card-heading h2,
.result-heading h2 {
    color: var(--primary-color);
    font-size: 1.75rem;
}

.card-heading p,
.result-heading p {
    color: #d8cfc4;
}

.step-pill {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: var(--text-light);
    font-weight: 800;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.1rem;
}

.field {
    display: flex;
    flex-direction: column;
    gap: .45rem;
}

.field[hidden] {
    display: none;
}

.field-full {
    grid-column: 1 / -1;
}

.field > span,
legend {
    color: #f6eee4;
    font-size: .94rem;
    font-weight: 700;
}

.field input,
.field select {
    width: 100%;
    min-height: 48px;
    border: 1px solid rgba(239, 230, 216, .26);
    border-radius: 10px;
    background: rgba(43, 10, 14, .82);
    color: #fff8ef;
    padding: .75rem .9rem;
    font: inherit;
    color-scheme: dark;
}

.field .money-input {
    font-variant-numeric: tabular-nums;
    letter-spacing: .01em;
}

.field input:focus,
.field select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.field small {
    color: #bfaea0;
    line-height: 1.35;
}

fieldset {
    border: 0;
    border-top: 1px solid rgba(239, 230, 216, .13);
    margin-top: 2rem;
    padding-top: 1.5rem;
}

legend {
    padding-right: 1rem;
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

.consent-row {
    display: flex;
    align-items: flex-start;
    gap: .8rem;
    margin-top: 2rem;
    color: #d8cfc4;
    cursor: pointer;
}

.consent-row input {
    width: 18px;
    height: 18px;
    margin-top: .2rem;
    accent-color: #efe6d8;
}

.calculate-button,
.download-button,
.result-cta a {
    border: 0;
    border-radius: 999px;
    font: inherit;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
}

.calculate-button {
    width: 100%;
    margin-top: 1.5rem;
    padding: 1rem 1.5rem;
    background: var(--primary-color);
    color: var(--text-light);
}

.calculate-button:hover,
.download-button:hover,
.result-cta a:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(239, 230, 216, .18);
}

.legal-copy {
    margin-top: 1rem;
    color: #af9e91;
    font-size: .8rem;
    text-align: center;
}

.form-error {
    margin-top: 1rem;
    padding: .85rem 1rem;
    border-radius: 10px;
    background: rgba(255, 92, 92, .15);
    border: 1px solid rgba(255, 120, 120, .35);
    color: #ffd4d4;
}

.calculator-side {
    position: sticky;
    top: 110px;
    display: grid;
    gap: 1rem;
    align-items: start;
}

.side-card {
    padding: 1.8rem;
}

.side-card h2 {
    color: var(--primary-color);
    margin: 1rem 0 .5rem;
}

.side-card p,
.side-card li {
    color: #d8cfc4;
}

.side-card ul {
    list-style: none;
    margin-top: 1.25rem;
}

.side-card li {
    padding: .55rem 0;
    border-bottom: 1px solid rgba(239, 230, 216, .1);
}

.side-card li::before {
    content: '✓';
    color: #7be3a6;
    margin-right: .6rem;
}

.specialist-card {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) 28px;
    align-items: center;
    gap: .9rem;
    padding: 1.1rem;
    background: linear-gradient(135deg, #25d366, #20c75f);
    border-radius: 18px;
    color: #092f18;
    text-decoration: none;
    box-shadow: 0 14px 35px rgba(37, 211, 102, .18);
    border: 1px solid rgba(255, 255, 255, .22);
    transition: transform .2s ease, box-shadow .2s ease;
}

.specialist-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 38px rgba(37, 211, 102, .28);
}

.specialist-card-icon {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(7, 82, 34, .88);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
}

.specialist-card-icon img {
    width: 25px;
    height: 25px;
}

.specialist-card-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.3;
}

.specialist-card-copy small {
    margin-bottom: .2rem;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    opacity: .72;
}

.specialist-card-copy strong {
    font-size: 1rem;
}

.specialist-card-copy > span {
    margin-top: .18rem;
    font-size: .86rem;
}

.specialist-card-arrow {
    font-size: 1.5rem;
    font-weight: 800;
    text-align: center;
}

.result-section {
    margin-top: 3rem;
    scroll-margin-top: 110px;
}

.result-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.download-button {
    padding: .9rem 1.35rem;
    background: var(--primary-color);
    color: var(--text-light);
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.summary-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.summary-card span {
    color: #cdbfb3;
    font-size: .9rem;
}

.summary-card strong {
    color: #fff8ef;
    font-size: clamp(1.35rem, 3vw, 2rem);
}

.summary-primary {
    background: var(--primary-color);
}

.summary-primary span,
.summary-primary strong {
    color: var(--text-light);
}

.result-columns {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.result-card {
    padding: 1.5rem;
}

.result-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.result-line {
    padding: .85rem 0;
    border-bottom: 1px solid rgba(239, 230, 216, .1);
}

.result-line:last-child {
    border-bottom: 0;
}

.result-line-main {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: #f7eee5;
}

.result-line small {
    display: block;
    margin-top: .25rem;
    color: #bba99c;
}

.fgts-box {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(239, 230, 216, .08);
    border-radius: 12px;
    color: #e8dbcf;
}

.result-cta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    margin-top: 1rem;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    border-radius: 22px;
    background: linear-gradient(135deg, #5d0010, #390009);
    border: 1px solid rgba(239, 230, 216, .18);
}

.result-cta h3 {
    color: var(--primary-color);
    font-size: 1.45rem;
}

.result-cta p {
    color: #d8cfc4;
    margin-top: .3rem;
}

.result-cta a {
    flex: 0 0 auto;
    padding: 1rem 1.4rem;
    background: #25d366;
    color: #092f18;
    text-align: center;
}

.calculator-footer {
    padding-top: 1rem;
}

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

    .calculator-side {
        position: static;
        grid-template-columns: 1fr;
        max-width: 100%;
    }

    .side-card {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        column-gap: 1rem;
        align-items: start;
    }

    .side-card h2,
    .side-card p,
    .side-card ul {
        grid-column: 2;
    }

    .side-card h2 {
        margin-top: 0;
    }

    .side-card .step-pill {
        grid-column: 1;
        grid-row: 1 / span 3;
    }

    .specialist-card {
        grid-template-columns: 52px minmax(0, 1fr) 32px;
        padding: 1.15rem 1.25rem;
    }

    .summary-grid {
        grid-template-columns: 1fr;
    }

    .result-cta {
        align-items: stretch;
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .calculator-main {
        padding-top: 105px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .side-card {
        display: block;
    }

    .side-card h2 {
        margin-top: 1rem;
    }

    .specialist-card {
        grid-template-columns: 42px minmax(0, 1fr) 24px;
        gap: .75rem;
        padding: 1rem;
    }

    .specialist-card-icon {
        width: 42px;
        height: 42px;
    }

    .specialist-card-copy strong {
        font-size: .95rem;
    }

    .specialist-card-copy > span {
        font-size: .8rem;
    }

    .field-full {
        grid-column: auto;
    }

    .result-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .download-button {
        width: 100%;
    }

    .privacy-note {
        border-radius: 14px;
    }
}
