.homepage-calculator--decimals {
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
    box-sizing: border-box;
    padding: 22px;
    border: 1px solid #dfe3e7;
    border-radius: 14px;
    background-color: #f8f9fb;
    box-shadow: 0 18px 42px -34px rgba(28, 37, 46, .55);
}

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

.decimal-form {
    width: 100%;
}

.decimal-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px minmax(0, 1fr);
    gap: 18px;
    align-items: stretch;
}

.decimal-panel,
.decimal-operation-panel,
.decimal-result,
.decimal-examples {
    min-width: 0;
    border: 1px solid #dfe3e7;
    border-radius: 12px;
    background-color: #fff;
}

.decimal-panel,
.decimal-operation-panel {
    padding: 18px;
}

.decimal-panel-title {
    margin: 0 0 14px;
    color: #2f3b46;
    font-size: 15px;
    font-weight: 900;
    line-height: 1.35;
}

.decimal-input-label {
    display: block;
    margin: 0;
}

.decimal-input-label span {
    display: block;
    margin: 0 0 7px;
    color: #667482;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.35;
    text-transform: uppercase;
}

.decimal-input-label input {
    display: block;
    width: 100%;
    height: 52px;
    border: 1px solid #dfe3e7;
    border-radius: 8px;
    padding: 0 14px;
    background-color: #fff;
    color: #273340;
    font-family: inherit;
    font-size: 20px;
    font-weight: 900;
    line-height: 52px;
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.decimal-input-label input:focus {
    outline: none;
    border-color: rgba(255, 72, 91, .5);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(255, 72, 91, .12);
}

.decimal-input-label input::placeholder {
    color: #a2a8ae;
}

.decimal-operation-panel--fixed {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.decimal-fixed-operation {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 86px;
    border: 1px solid rgba(255, 72, 91, .18);
    border-radius: 12px;
    background-color: rgba(255, 72, 91, .07);
    color: var(--color-accent, #ff485b);
}

.decimal-fixed-operation span {
    display: block;
    font-size: 42px;
    font-weight: 900;
    line-height: 1;
}

.homepage-calculator--decimals .calculator-key {
    min-width: 0;
    min-height: 46px;
    height: 46px;
    padding: 0 12px;
    border: 1px solid #dfe3e7;
    border-radius: 8px;
    background-color: #fff;
    color: #273340;
    font-family: inherit;
    font-size: 15px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    text-align: center;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .15s ease, box-shadow .2s ease;
}

.homepage-calculator--decimals .calculator-key:hover {
    border-color: rgba(255, 72, 91, .42);
    color: var(--color-accent, #ff485b);
    box-shadow: 0 10px 22px -18px rgba(28, 37, 46, .45);
}

.homepage-calculator--decimals .calculator-key:active {
    transform: translateY(1px);
    box-shadow: none;
}

.homepage-calculator--decimals .calculator-key:focus {
    outline: none;
}

.homepage-calculator--decimals .calculator-key:focus-visible {
    border-color: var(--color-accent, #ff485b);
    box-shadow: 0 0 0 3px rgba(255, 72, 91, .14);
}

.homepage-calculator--decimals .calculator-key--function {
    border-color: #dfe3e7;
    background-color: #f4f5f7;
    color: #667482;
}

.homepage-calculator--decimals .calculator-key--function:hover {
    border-color: rgba(255, 72, 91, .42);
    background-color: rgba(255, 72, 91, .08);
    color: var(--color-accent, #ff485b);
}

.homepage-calculator--decimals .calculator-key--equal {
    border-color: var(--color-accent, #ff485b);
    background-color: var(--color-accent, #ff485b);
    color: #fff;
}

.homepage-calculator--decimals .calculator-key--equal:hover {
    border-color: var(--color-accent-dark, #e73b50);
    background-color: var(--color-accent-dark, #e73b50);
    color: #fff;
}

.homepage-calculator--decimals .calculator-key--danger {
    border-color: rgba(255, 72, 91, .35);
    background-color: rgba(255, 72, 91, .08);
    color: var(--color-accent, #ff485b);
}

.homepage-calculator--decimals .calculator-key--danger:hover {
    border-color: var(--color-accent, #ff485b);
    background-color: var(--color-accent, #ff485b);
    color: #fff;
}

.decimal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.decimal-actions .btn,
.decimal-actions button,
.decimal-actions input[type="button"],
.decimal-actions input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid var(--color-accent, #ff485b);
    border-radius: 8px;
    background-color: var(--color-accent, #ff485b);
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 900;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease, transform .15s ease;
}

.decimal-actions .btn:hover,
.decimal-actions button:hover,
.decimal-actions input[type="button"]:hover,
.decimal-actions input[type="submit"]:hover {
    border-color: var(--color-accent-dark, #e73b50);
    background-color: var(--color-accent-dark, #e73b50);
    color: #fff;
    text-decoration: none;
}

.decimal-actions .btn:active,
.decimal-actions button:active,
.decimal-actions input[type="button"]:active,
.decimal-actions input[type="submit"]:active {
    transform: translateY(1px);
}

.decimal-actions .btn:focus,
.decimal-actions button:focus,
.decimal-actions input[type="button"]:focus,
.decimal-actions input[type="submit"]:focus {
    outline: none;
}

.decimal-actions .btn:focus-visible,
.decimal-actions button:focus-visible,
.decimal-actions input[type="button"]:focus-visible,
.decimal-actions input[type="submit"]:focus-visible {
    box-shadow: 0 0 0 3px rgba(255, 72, 91, .14);
}

.decimal-actions .btn-secondary,
.decimal-actions .btn-light,
.decimal-actions .btn-outline-secondary,
.decimal-actions button[type="reset"] {
    border-color: #dfe3e7;
    background-color: #f4f5f7;
    color: #667482;
}

.decimal-actions .btn-secondary:hover,
.decimal-actions .btn-light:hover,
.decimal-actions .btn-outline-secondary:hover,
.decimal-actions button[type="reset"]:hover {
    border-color: rgba(255, 72, 91, .42);
    background-color: rgba(255, 72, 91, .08);
    color: var(--color-accent, #ff485b);
}

.decimal-main-button {
    min-width: 190px;
}

.decimal-result {
    margin-top: 18px;
    padding: 18px;
    border-color: rgba(255, 72, 91, .18);
    background-color: rgba(255, 72, 91, .07);
}

.decimal-result-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.decimal-result-label {
    margin: 0 0 4px;
    color: #2f3b46;
    font-size: 16px;
    font-weight: 900;
    line-height: 1.35;
}

.decimal-result-expression {
    color: #667482;
    font-size: 13px;
    line-height: 1.5;
    word-break: break-word;
}

.decimal-result-value {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 82px;
    margin: 10px 0 16px;
    color: #222c38;
    font-size: 34px;
    font-weight: 900;
    line-height: 1.2;
    text-align: center;
    word-break: break-word;
}

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

.decimal-detail {
    min-width: 0;
    padding: 12px;
    border: 1px solid rgba(255, 72, 91, .14);
    border-radius: 12px;
    background-color: rgba(255, 255, 255, .82);
}

.decimal-detail span {
    display: block;
    margin: 0 0 4px;
    color: #667482;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.35;
    text-transform: uppercase;
}

.decimal-detail strong {
    display: block;
    color: #2f3b46;
    font-size: 15px;
    font-weight: 900;
    line-height: 1.4;
    word-break: break-word;
}

.decimal-error {
    display: none;
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 72, 91, .22);
    border-radius: 12px;
    background-color: rgba(255, 72, 91, .08);
    color: var(--color-accent-dark, #e73b50);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
}

.decimal-error.is-visible {
    display: block;
}

.decimal-examples {
    margin-top: 18px;
    padding: 16px;
}

.decimal-examples-title {
    margin: 0 0 12px;
    color: #2f3b46;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.35;
}

.decimal-example-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.decimal-example-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid #dfe3e7;
    border-radius: 999px;
    background-color: #f4f5f7;
    color: #667482;
    font-family: inherit;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
    text-align: center;
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease, transform .15s ease;
}

.decimal-example-button:hover {
    border-color: rgba(255, 72, 91, .42);
    background-color: rgba(255, 72, 91, .08);
    color: var(--color-accent, #ff485b);
}

.decimal-example-button:active {
    transform: translateY(1px);
}

.decimal-example-button:focus {
    outline: none;
}

.decimal-example-button:focus-visible {
    border-color: var(--color-accent, #ff485b);
    box-shadow: 0 0 0 3px rgba(255, 72, 91, .14);
}

@media (max-width: 991px) {
    .homepage-calculator--decimals {
        max-width: 100%;
    }

    .decimal-layout {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .decimal-fixed-operation {
        min-height: 64px;
    }

    .decimal-fixed-operation span {
        font-size: 34px;
    }
}

@media (max-width: 575px) {
    .homepage-calculator--decimals {
        padding: 14px;
        border-radius: 12px;
    }

    .decimal-panel,
    .decimal-operation-panel,
    .decimal-result,
    .decimal-examples {
        border-radius: 12px;
    }

    .decimal-panel,
    .decimal-operation-panel {
        padding: 14px;
    }

    .decimal-input-label input {
        height: 48px;
        border-radius: 7px;
        font-size: 18px;
        line-height: 48px;
    }

    .homepage-calculator--decimals .calculator-key {
        min-height: 44px;
        height: 44px;
        border-radius: 7px;
        font-size: 14px;
        padding: 0 8px;
    }

    .decimal-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .decimal-actions .btn,
    .decimal-actions button,
    .decimal-actions input[type="button"],
    .decimal-actions input[type="submit"] {
        width: 100%;
    }

    .decimal-main-button {
        width: 100%;
        min-width: 0;
    }

    .decimal-result {
        padding: 14px;
    }

    .decimal-result-header {
        display: block;
    }

    .decimal-result-value {
        min-height: 72px;
        font-size: 28px;
    }

    .decimal-result-details {
        grid-template-columns: 1fr;
    }

    .decimal-example-buttons {
        display: grid;
        grid-template-columns: 1fr;
    }

    .decimal-example-button {
        width: 100%;
    }
}

@media (max-width: 420px) {
    .homepage-calculator--decimals {
        padding: 13px;
    }

    .decimal-panel,
    .decimal-operation-panel,
    .decimal-result,
    .decimal-examples {
        padding-left: 12px;
        padding-right: 12px;
    }

    .decimal-fixed-operation span {
        font-size: 30px;
    }

    .decimal-result-value {
        font-size: 24px;
    }
}