.calculator-sticky {
    position: sticky;
    top: 12px;
    z-index: 1;
}

.max-w-760 {
    max-width: 760px;
}

.row > * {
    min-width: 0;
}

@media (max-width: 991.98px) {
    .calculator-sticky {
        position: static;
        top: auto;
    }
}

.tax-breakdown-bar {
    display: grid;
    grid-template-columns: minmax(0, var(--base-share, 86%)) minmax(0, var(--tax-share, 14%));
    min-height: 18px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
}

.tax-breakdown-bar::before,
.tax-breakdown-bar::after {
    content: "";
    display: block;
    min-height: 18px;
}

.tax-breakdown-bar::before {
    background: rgba(13, 110, 253, 0.9);
}

.tax-breakdown-bar::after {
    background: rgba(255, 193, 7, 0.95);
}

.formula-box {
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 1rem;
    padding: 0.85rem 1rem;
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}

.step-number {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(13, 110, 253, 0.12);
    color: #0d6efd;
    font-weight: 700;
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
        line-height: 1.15;
        overflow-wrap: anywhere;
    }

    .card-body {
        padding: 1.25rem !important;
    }

    .input-group .form-control,
    .input-group .form-select {
        min-width: 0;
    }

    .btn-lg {
        font-size: 1rem;
    }

    .formula-box {
        font-size: 0.85rem;
    }
}
