.upcalc-wrap,
.upcalc-wrap * { box-sizing: border-box; }

.upcalc-wrap {
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    padding: 24px;
    border: 1px solid #d9e4f2;
    border-radius: 20px;
    background: #f7faff;
    color: #081c3a;
    font-family: inherit;
}

.upcalc-intro {
    margin: 0 0 22px 0;
    color: #28456f;
    font-size: 16px;
    line-height: 1.45;
}

.upcalc-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 1fr);
    gap: 18px;
    align-items: start;
    height: auto !important;
    overflow: visible !important;
}

.upcalc-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.upcalc-input-card,
.upcalc-results-card {
    height: auto !important;
    overflow: visible !important;
}

.upcalc-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px 14px;
    height: auto !important;
    overflow: visible !important;
}

.upcalc-field label {
    display: block;
    margin: 0 0 10px;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.25;
    color: #061b38;
}

.upcalc-field input,
.upcalc-field select {
    display: block;
    width: 100%;
    min-height: 40px;
    height: 40px;
    line-height: 1.2;
    padding: 8px 14px;
    border: 1px solid #d2deee;
    border-radius: 11px;
    background: #ffffff;
    color: #001a3d;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    overflow: visible;
    appearance: auto;
    -webkit-appearance: auto;
}

.upcalc-field select {
    padding-top: 7px;
    padding-bottom: 7px;
}

.upcalc-button {
    width: 100%;
    min-height: 58px;
    margin-top: 26px;
    border: 0;
    border-radius: 14px;
    color: #ffffff;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    font-family: inherit;
}

.upcalc-button,
.upcalc-hero {
    background: linear-gradient(135deg, var(--upcalc-accent-start, #5b8def) 0%, var(--upcalc-accent-end, #4f70bc) 100%);
}

.upcalc-hero {
    border-radius: 16px;
    padding: 22px 18px;
    color: #ffffff;
    margin-bottom: 18px;
}

.upcalc-hero-label {
    font-size: 14px;
    margin-bottom: 8px;
    opacity: 0.95;
}

.upcalc-hero-value {
    font-size: clamp(26px, 3vw, 34px);
    line-height: 1.15;
    font-weight: 800;
}

.upcalc-result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 17px 0;
    border-bottom: 1px solid #e6edf5;
    color: #334155;
    font-size: 15px;
}

.upcalc-result-row strong {
    color: #020617;
    font-size: 18px;
    white-space: nowrap;
}

.upcalc-result-row small {
    color: #7b8aa3;
    font-size: 12px;
}

.upcalc-assumption,
.upcalc-disclaimer {
    color: #4b6386;
    line-height: 1.45;
    font-size: 14px;
}

.upcalc-assumption { margin: 22px 0 0; }
.upcalc-disclaimer { margin: 20px 0 0; }

@media (max-width: 760px) {
    .upcalc-wrap { padding: 18px; }
    .upcalc-grid { grid-template-columns: 1fr; }
    .upcalc-fields { grid-template-columns: 1fr; gap: 18px; }
}
