
.hiup-profit-calculator,
.hiup-profit-calculator * {
    box-sizing: border-box;
}

.hiup-profit-calculator {
    --hiup-green: #147d4c;
    --hiup-green-dark: #0c5e39;
    --hiup-green-soft: #edf8f2;
    --hiup-border: #dfe7e2;
    --hiup-text: #17221c;
    --hiup-muted: #637067;
    --hiup-danger: #c0392b;
    max-width: 1160px;
    margin: 28px auto;
    font-family: inherit;
    color: var(--hiup-text);
}

.hiup-profit-header {
    margin-bottom: 22px;
}

.hiup-profit-kicker {
    display: inline-block;
    margin-bottom: 8px;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--hiup-green-soft);
    color: var(--hiup-green);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .06em;
}

.hiup-profit-header h2 {
    margin: 0 0 8px;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.2;
    color: var(--hiup-text);
}

.hiup-profit-header p {
    margin: 0;
    max-width: 760px;
    color: var(--hiup-muted);
    font-size: 16px;
}

.hiup-profit-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(320px, .88fr);
    gap: 22px;
    align-items: start;
}

.hiup-profit-form-card,
.hiup-profit-result-card {
    background: #fff;
    border: 1px solid var(--hiup-border);
    border-radius: 18px;
    box-shadow: 0 12px 34px rgba(20, 60, 38, .08);
}

.hiup-profit-form-card {
    padding: 24px;
}

.hiup-profit-result-card {
    position: sticky;
    top: 20px;
    overflow: hidden;
}

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

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

.hiup-field label {
    display: block;
    margin-bottom: 7px;
    font-size: 14px;
    font-weight: 700;
    color: #26342b;
}

.hiup-field input,
.hiup-field select {
    width: 100%;
    height: 48px;
    margin: 0;
    padding: 0 13px;
    border: 1px solid #ccd8d0;
    border-radius: 10px;
    background: #fff;
    color: var(--hiup-text);
    font-size: 15px;
    outline: none;
    box-shadow: none;
}

.hiup-field input:focus,
.hiup-field select:focus {
    border-color: var(--hiup-green);
    box-shadow: 0 0 0 3px rgba(20, 125, 76, .11);
}

.hiup-input-suffix {
    position: relative;
}

.hiup-input-suffix input {
    padding-right: 72px;
}

.hiup-input-suffix span {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    color: var(--hiup-muted);
    font-size: 13px;
    pointer-events: none;
}

.hiup-hidden {
    display: none !important;
}

.hiup-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 22px;
}

.hiup-btn {
    min-height: 46px;
    padding: 0 18px;
    border: 0;
    border-radius: 10px;
    font-weight: 800;
    cursor: pointer;
    transition: transform .15s ease, opacity .15s ease, background .15s ease;
}

.hiup-btn:hover {
    transform: translateY(-1px);
}

.hiup-btn-primary {
    flex: 1;
    background: var(--hiup-green);
    color: #fff;
}

.hiup-btn-primary:hover {
    background: var(--hiup-green-dark);
}

.hiup-btn-secondary {
    background: #eef3f0;
    color: #36443b;
}

.hiup-profit-note {
    margin: 15px 0 0;
    color: var(--hiup-muted);
    font-size: 12px;
    line-height: 1.6;
}

.hiup-result-title {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--hiup-border);
    background: #fbfdfc;
}

.hiup-result-title span {
    color: var(--hiup-muted);
}

.hiup-result-title strong {
    color: var(--hiup-green);
}

.hiup-profit-main-result {
    padding: 24px 20px;
    text-align: center;
    background: linear-gradient(135deg, #0d6e42, #17955b);
    color: #fff;
}

.hiup-profit-main-result span {
    display: block;
    font-size: 14px;
    opacity: .9;
}

.hiup-profit-main-result strong {
    display: block;
    margin: 8px 0 5px;
    font-size: clamp(30px, 5vw, 46px);
    line-height: 1.1;
    word-break: break-word;
}

.hiup-profit-main-result small {
    font-size: 13px;
    opacity: .92;
}

.hiup-profit-main-result.is-loss {
    background: linear-gradient(135deg, #a93226, #d94b3d);
}

.hiup-result-list {
    padding: 6px 20px;
}

.hiup-result-list > div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px dashed var(--hiup-border);
}

.hiup-result-list span {
    color: var(--hiup-muted);
}

.hiup-result-list strong {
    text-align: right;
}

.hiup-scenario-box {
    margin: 15px 20px;
    padding: 16px;
    border-radius: 12px;
    background: #f6faf7;
    border: 1px solid #e1ebe5;
}

.hiup-scenario-box h3 {
    margin: 0 0 12px;
    font-size: 16px;
}

.hiup-scenario-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 0;
    font-size: 14px;
}

.hiup-scenario-row + .hiup-scenario-row {
    border-top: 1px solid #e6eee9;
}

.hiup-analysis-box {
    margin: 0 20px 20px;
    padding: 15px 16px;
    border-left: 4px solid var(--hiup-green);
    border-radius: 8px;
    background: var(--hiup-green-soft);
    color: #244832;
    font-size: 14px;
    line-height: 1.65;
}

@media (max-width: 850px) {
    .hiup-profit-grid {
        grid-template-columns: 1fr;
    }

    .hiup-profit-result-card {
        position: static;
    }
}

@media (max-width: 560px) {
    .hiup-profit-calculator {
        margin: 18px auto;
    }

    .hiup-profit-form-card {
        padding: 17px;
    }

    .hiup-form-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

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

    .hiup-form-actions {
        flex-direction: column;
    }

    .hiup-result-list > div {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .hiup-result-list strong {
        text-align: left;
    }
}
