.rfc-calculator {
    color: #202020;
    font-family: inherit;
    margin: 32px auto;
    max-width: 980px;
}

.rfc-calculator *,
.rfc-calculator *::before,
.rfc-calculator *::after {
    box-sizing: border-box;
}

.rfc-inner {
    background: #ffffff;
    border: 1px solid #e7e1da;
    border-radius: 8px;
    box-shadow: 0 16px 42px rgba(35, 28, 22, 0.08);
    padding: clamp(24px, 4vw, 44px);
}

.rfc-header {
    border-bottom: 1px solid #e7e1da;
    margin-bottom: 28px;
    padding-bottom: 24px;
}

.rfc-kicker {
    color: #202020;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.3;
    background-color: #dedc00;
    display: inline-block;
    padding: 10px;
    border-radius: 0 0 10px 0;
    margin-bottom: 10px !important;
}

.rfc-header h2,
.rfc-step-heading h3,
.rfc-result h3,
.rfc-detail h4 {
    color: #202020;
    font-family: inherit;
    font-weight: 650;
    letter-spacing: 0;
    line-height: 1.2;
    margin: 0;
}

.rfc-header h2 {
    font-size: clamp(26px, 3vw, 36px);
    margin-bottom: 12px;
}

.rfc-header p:last-child {
    color: #66615c;
    font-size: 16px;
    line-height: 1.65;
    margin: 0;
    max-width: 700px;
}

.rfc-step {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 220ms ease, transform 220ms ease;
}

.rfc-step + .rfc-step {
    margin-top: 28px;
}

.rfc-step.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.rfc-step[hidden] {
    display: none;
}

.rfc-step-heading {
    align-items: baseline;
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
}

.rfc-step-heading span {
    color: #9296a1;
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.rfc-step-heading h3 {
    font-size: 19px;
}

.rfc-card-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rfc-card-grid--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rfc-option {
    appearance: none;
    background: #f4f5f6;
    border: 1px solid #e7e1da;
    border-radius: 10px;
    color: #202020;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    font-family: inherit;
    gap: 7px;
    min-height: 76px;
    padding: 17px 18px;
    text-align: left;
    transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
    width: 100%;
}

.rfc-option:hover,
.rfc-option:focus-visible {
    border-color: #202020;
    box-shadow: 0 10px 24px rgba(35, 28, 22, 0.07);
    outline: none;
}

.rfc-option.is-active {
    background: rgb(222 220 0 / 43%);
    border-color: #202020;
    box-shadow: inset 0 0 0 1px rgba(138, 31, 31, 0.18);
}

.rfc-option-title {
    display: block;
    font-size: 15px;
    font-weight: 650;
    line-height: 1.35;
}

.rfc-option-description {
    color: #66615c;
    display: block;
    font-size: 13px;
    line-height: 1.55;
}

.rfc-context-note,
.rfc-limit-note,
.rfc-disclaimer,
.rfc-error {
    border-radius: 7px;
    font-size: 13px;
    line-height: 1.55;
    margin: 14px 0 0;
    padding: 12px 14px;
}

.rfc-context-note,
.rfc-limit-note {
    background: #faf8f5;
    border: 1px solid #e7e1da;
    color: #66615c;
}

.rfc-form {
    background: #f4f5f6;
    border: 1px solid #e7e1da;
    border-radius: 8px;
    padding: 22px;
}

.rfc-field {
    display: block;
    margin: 0 0 16px;
}

.rfc-field > span:first-child {
    color: #202020;
    display: block;
    font-size: 14px;
    font-weight: 650;
    margin-bottom: 8px;
}

.rfc-input-wrap {
    align-items: center;
    background: #ffffff;
    border: 1px solid #e7e1da;
    border-radius: 7px;
    display: flex;
    gap: 8px;
    max-width: 340px;
    padding: 0 14px;
    transition: border-color 180ms ease, box-shadow 180ms ease;
}

.rfc-input-wrap:focus-within {
    border-color: #8a1f1f;
    box-shadow: 0 0 0 3px rgba(138, 31, 31, 0.1);
}

.rfc-input-wrap span {
    color: #66615c;
    font-size: 16px;
}

.rfc-input-wrap input {
    background: transparent;
    border: 0;
    color: #202020;
    flex: 1;
    font-family: inherit;
    font-size: 16px;
    min-height: 48px;
    min-width: 0;
    outline: 0;
    padding: 0;
    width: 100%;
}

.rfc-error {
    background: #fff7f5;
    border: 1px solid #efc8bd;
    color: #8a2d1f;
    margin-bottom: 14px;
}

.rfc-submit {
    appearance: none;
    background: #8a1f1f;
    border: 1px solid #8a1f1f;
    border-radius: 6px;
    color: #ffffff;
    cursor: pointer;
    font-family: inherit;
    font-size: 15px;
    font-weight: 650;
    line-height: 1.3;
    min-height: 46px;
    padding: 12px 20px;
    transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.rfc-submit:hover,
.rfc-submit:focus-visible {
    background: #681717;
    border-color: #681717;
    outline: none;
}

.rfc-submit:active {
    transform: translateY(1px);
}

.rfc-result {
    border: 1px solid #e7e1da;
    border-radius: 8px;
    overflow: hidden;
}

.rfc-result-main {
    align-items: flex-start;
    background: #f4f5f6;
    display: grid;
    gap: 22px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 24px;
}

.rfc-result-label {
    color: #7d8083;
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 7px;
    text-transform: uppercase;
}

.rfc-result h3 {
    font-size: 22px;
}

.rfc-result-values {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(130px, 1fr));
    margin: 0;
}

.rfc-result-values div {
    background: #f1f091;
    border: 1px solid #161518;
    border-radius: 7px;
    padding: 14px;
}

.rfc-result-values dt {
    color: #66615c;
    font-size: 12px;
    font-weight: 650;
    letter-spacing: 0.03em;
    margin: 0 0 5px;
    text-transform: uppercase;
}

.rfc-result-values dd {
    color: #202020;
    font-size: 20px;
    font-weight: 650;
    line-height: 1.2;
    margin: 0;
}

.rfc-detail {
    padding: 24px;
}

.rfc-detail h4 {
    font-size: 18px;
    margin-bottom: 14px;
}

.rfc-detail-table-wrap {
    border: 1px solid #e7e1da;
    border-radius: 7px;
    overflow: hidden;
}

.rfc-detail-table {
    background: #ffffff;
    border: 0;
    border-collapse: collapse;
    margin: 0;
    table-layout: fixed;
    width: 100%;
}

.rfc-detail-table th,
.rfc-detail-table td {
    border: 0;
    border-bottom: 1px solid #e7e1da;
    color: #202020;
    font-size: 14px;
    line-height: 1.45;
    padding: 13px 14px;
    text-align: left;
    vertical-align: middle;
}

.rfc-detail-table th:first-child,
.rfc-detail-table td:first-child {
    padding-left: 14px !important;
}

.rfc-detail-table th:last-child,
.rfc-detail-table td:last-child {
    padding-right: 14px !important;
}

.rfc-detail-table thead th {
    background: #f4f5f6;
    color: #66615c;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.rfc-detail-table tbody th {
    font-weight: 650;
}

.rfc-detail-table tbody td {
    font-weight: 650;
}

.rfc-detail-table tr:last-child th,
.rfc-detail-table tr:last-child td {
    border-bottom: 0;
}

.rfc-detail-table th:nth-child(2),
.rfc-detail-table td:nth-child(2),
.rfc-detail-table th:nth-child(3),
.rfc-detail-table td:nth-child(3) {
    text-align: right;
}

.rfc-disclaimer {
    background: transparent;
    border-top: 1px solid #e7e1da;
    color: #66615c;
    margin: 0;
    padding: 16px 24px 22px;
}

@media (max-width: 780px) {
    .rfc-calculator {
        margin: 24px auto;
    }

    .rfc-card-grid,
    .rfc-card-grid--three,
    .rfc-result-main {
        grid-template-columns: 1fr;
    }

    .rfc-result-values {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }
}

@media (max-width: 520px) {
    .rfc-inner {
        padding: 22px 16px;
    }

    .rfc-header {
        margin-bottom: 24px;
        padding-bottom: 20px;
    }

    .rfc-step-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .rfc-option,
    .rfc-form,
    .rfc-result-main,
    .rfc-detail {
        padding: 16px;
    }

    .rfc-input-wrap {
        max-width: none;
    }

    .rfc-submit {
        width: 100%;
    }

    .rfc-result-values {
        grid-template-columns: 1fr;
    }

    .rfc-result-values dd {
        font-size: 19px;
    }

    .rfc-detail-table,
    .rfc-detail-table thead,
    .rfc-detail-table tbody,
    .rfc-detail-table tr,
    .rfc-detail-table th,
    .rfc-detail-table td {
        display: block;
        width: 100%;
    }

    .rfc-detail-table thead {
        display: none;
    }

    .rfc-detail-table tbody tr {
        border-bottom: 1px solid #e7e1da;
        padding: 13px 14px;
    }

    .rfc-detail-table tbody tr:last-child {
        border-bottom: 0;
    }

    .rfc-detail-table th,
    .rfc-detail-table td,
    .rfc-detail-table tr:last-child th,
    .rfc-detail-table tr:last-child td {
        border-bottom: 0;
        padding: 0;
        text-align: left;
    }

    .rfc-detail-table tbody th {
        margin-bottom: 8px;
    }

    .rfc-detail-table tbody td {
        align-items: baseline;
        display: flex;
        justify-content: space-between;
        gap: 16px;
        margin-top: 6px;
    }

    .rfc-detail-table tbody td::before {
        color: #66615c;
        content: attr(data-label);
        font-size: 12px;
        font-weight: 700;
        letter-spacing: 0.03em;
        text-transform: uppercase;
    }

    .rfc-disclaimer {
        padding: 15px 16px 18px;
    }
}
