/* Free-tool pages (/split-expenses-by-income, /budget-calculator, /subscription-cost-calculator). */

#tool-page {
    padding: 3rem 0;
    max-width: 760px;
}

    #tool-page h1 {
        font-family: 'Bricolage Grotesque', sans-serif;
        font-size: 2.2rem;
        font-weight: bold;
        line-height: 1.15;
        margin: 0 0 1rem;
    }

    #tool-page .lead {
        font-size: 1.15rem;
        line-height: 1.6;
        margin: 0 0 1.5rem;
    }

    #tool-page h2 {
        font-family: 'Bricolage Grotesque', sans-serif;
        font-size: 1.5rem;
        font-weight: bold;
        margin: 2rem 0 0.75rem;
    }

    #tool-page p,
    #tool-page li {
        line-height: 1.6;
    }

    #tool-page a {
        text-decoration: underline;
    }

.tool-card {
    border: 1px solid rgba(81, 93, 113, .13);
    border-radius: 20px;
    background: #fff;
    padding: 20px;
    margin: 0 0 20px;
}

    .tool-card > h2:first-child {
        margin-top: 0;
    }

.tool-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 16px;
}

.group-label {
    font-weight: 600;
    font-size: .95rem;
    margin: 18px 0 10px;
}

    .group-label:first-of-type {
        margin-top: 0;
    }

.field label {
    display: block;
    font-size: .9rem;
    color: #454545;
    margin-bottom: 6px;
}

.field .field-box {
    display: flex;
    align-items: center;
    border: 1px solid #d9d9d9;
    border-radius: 12px;
    padding: 0 12px;
    background: #fff;
}

    .field .field-box:focus-within {
        border-color: #121212;
    }

.field input,
.field select {
    border: 0;
    outline: 0;
    background: transparent;
    font: inherit;
    font-size: 1.05rem;
    color: #121212;
    width: 100%;
    padding: 10px 0;
}

.field .sym {
    color: #8f8f8f;
    font-size: .95rem;
    margin-right: 6px;
}

.tool-total {
    padding: 6px 0 0;
}

    .tool-total .big {
        font-family: 'Bricolage Grotesque', sans-serif;
        font-size: 2.6rem;
        font-weight: bold;
        line-height: 1.05;
        display: block;
    }

    .tool-total .note {
        font-size: .9rem;
        color: #8f8f8f;
    }

.tool-bar {
    display: flex;
    height: 10px;
    border: 1px solid rgba(81, 93, 113, .13);
    border-radius: 10px;
    overflow: hidden;
    background: #fafafa;
    margin: 14px 0;
}

    .tool-bar span {
        height: 100%;
    }

.res-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.res-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid rgba(81, 93, 113, .13);
}

    .res-row:last-child {
        border-bottom: 0;
    }

    .res-row .label {
        color: #454545;
    }

        .res-row .label small {
            display: block;
            font-size: .85rem;
            color: #8f8f8f;
        }

    .res-row .value {
        font-family: 'Bricolage Grotesque', sans-serif;
        font-weight: bold;
        font-size: 1.25rem;
        white-space: nowrap;
    }

    .res-row.is-strong .value {
        font-size: 1.6rem;
    }

.tool-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.tool-btn {
    background: none;
    border: 1px solid #c9c9c9;
    border-radius: 40px;
    padding: 8px 20px;
    font: inherit;
    font-size: 1rem;
    color: #121212;
    cursor: pointer;
}

    .tool-btn:hover {
        border-color: #121212;
    }

    .tool-btn.small {
        padding: 4px 14px;
        font-size: .9rem;
    }

.sub-row {
    display: grid;
    grid-template-columns: 1.6fr 1fr .9fr auto;
    gap: 8px;
    align-items: end;
    margin-bottom: 12px;
}

    .sub-row .field {
        margin: 0;
    }

.sub-head {
    font-size: .85rem;
    color: #8f8f8f;
    margin-bottom: 4px;
}

    .sub-head span {
        padding-left: 12px;
    }

.hint {
    font-size: .9rem;
    color: #8f8f8f;
    margin: 12px 0 0;
}


.more-tools {
    border: 1px solid rgba(81, 93, 113, .13);
    border-radius: 20px;
    background: #fafafa;
    padding: 18px 20px;
    margin: 2rem 0 0;
}

    .more-tools h2 {
        margin: 0 0 .5rem;
        font-size: 1.25rem;
    }

    .more-tools ul {
        margin: 0;
        padding-left: 1.1rem;
    }

@media (max-width: 640px) {
    .tool-grid {
        grid-template-columns: 1fr;
    }

    .sub-row {
        grid-template-columns: 1fr 1fr;
    }

    .sub-head {
        display: none;
    }

        .sub-row .remove {
            grid-column: 1 / -1;
            justify-self: start;
        }

    #tool-page h1 {
        font-size: 1.9rem;
    }
}
