.finance-back {
    display: inline-block;
    margin-bottom: 22px;
    color: #ebedf0;
    font-size: 14px;
    text-underline-offset: 4px;
}

.finance-card h1 {
    font-size: clamp(28px, 5vw, 38px);
    line-height: 1.12;
}

.finance-intro {
    margin: 10px 0 24px;
    color: #c8ccd3;
    line-height: 1.5;
}

.finance-details,
.finance-panel {
    min-width: 0;
    padding: 16px;
    border: 1px solid #343c48;
    border-radius: 18px;
    background: #111722;
}

.finance-details {
    margin: 0 0 16px;
}

.finance-details legend,
.finance-panel h2 {
    color: #fff;
    font-size: 17px;
    font-weight: 700;
}

.finance-details legend {
    padding: 0 6px;
}

.finance-panel h2 {
    margin: 0 0 16px;
}

.finance-fields,
.finance-calculations {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
}

.finance-balance {
    margin: 16px 0 0;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
}

.finance-balance strong {
    font-size: 24px;
}

.finance-card label,
.finance-card small {
    display: block;
    line-height: 1.4;
}

.finance-card label {
    font-size: 14px;
    font-weight: 700;
}

.finance-card small,
.finance-note {
    color: #b8bec9;
    font-size: 13px;
}

.finance-card input,
.finance-card button {
    width: 100%;
    min-height: 46px;
    border-radius: 10px;
    font: inherit;
}

.finance-card input {
    margin: 6px 0 3px;
    padding: 8px 10px;
    border: 1px solid #687382;
    background: #020408;
    color: #fff;
}

.finance-card input::placeholder {
    color: #464e5a;
    opacity: 1;
}

.finance-percent {
    position: relative;
}

.finance-percent input {
    padding-right: 36px;
}

.finance-percent span {
    position: absolute;
    inset: 6px 12px 3px auto;
    display: flex;
    align-items: center;
    color: #b8bec9;
    pointer-events: none;
}

.finance-card :focus-visible {
    outline: 2px solid #ff858d;
    outline-offset: 3px;
}

.finance-card button {
    margin-top: 10px;
    padding: 8px 12px;
    border: 1px solid #ea5662;
    background: #a71523;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.finance-card button:hover {
    background: #b91929;
}

.finance-card .finance-save {
    margin-top: 16px;
    border-color: #388e73;
    background: var(--finance-button-background);
}

.finance-card .finance-save:hover {
    background: var(--finance-button-background);
    filter: brightness(1.08);
}

.finance-result {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    margin: 16px 0 0;
    padding-top: 14px;
    border-top: 1px solid #343c48;
    font-size: 14px;
}

.finance-result[hidden] {
    display: none;
}

.finance-result dd {
    margin: 0;
    text-align: right;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.finance-result dt:nth-of-type(-n+2),
.finance-result dd:nth-of-type(-n+2) {
    color: #ff9fa5;
    font-weight: 700;
}

.finance-proposal-summary:not([hidden]) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
    margin: 14px 0 0;
    padding: 10px 12px;
    border: 1px solid #343c48;
    border-radius: 10px;
    background: #090d14;
    font-size: 13px;
    line-height: 1.4;
}

.finance-proposal-summary dt {
    color: #b8bec9;
}

.finance-proposal-summary dd {
    margin: 2px 0 0;
    color: #fff;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}

.finance-comparison:not(:empty) {
    margin-top: 16px;
    padding: 12px 14px;
    border: 1px solid #687382;
    border-radius: 12px;
    line-height: 1.45;
}

.finance-comparison[data-tone="positive"] {
    border-color: #318461;
    background: #10281f;
    color: #91edba;
}

.finance-comparison[data-tone="negative"] {
    border-color: #a34751;
    background: #35171d;
    color: #ffb1b8;
}

.finance-comparison[data-tone="close"] {
    border-color: #9f8035;
    background: #302613;
    color: #ffe286;
}

.finance-note {
    margin: 16px 0 0;
    line-height: 1.5;
}

