:root {
    --teal: #0d9488;
    --teal-dark: #0f766e;
    --teal-light: #f0fdfa;
    --teal-border: #99f6e4;
    --gold: #f59e0b;
    --gold-light: #fffbeb;
    --green: #16a34a;
    --green-light: #f0fdf4;
    --green-border: #bbf7d0;
    --orange: #f97316;
    --orange-light: #fff7ed;
    --red: #dc2626;
    --text: #1a1a2e;
    --muted: #6b7280;
    --white: #ffffff;
    --light: #f8fafc;
    --border: #e2e8f0;
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', -apple-system, sans-serif;
    background: var(--light);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
}

.page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px 80px;
}

.page-eyebrow {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--teal);
    margin-bottom: 10px;
}

.page-title {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 8px;
}

    .page-title em {
        font-style: normal;
        color: var(--teal);
    }

.page-sub {
    font-size: 15px;
    color: var(--muted);
    max-width: 640px;
    margin-bottom: 36px;
}

.calc-grid {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 28px;
    margin-bottom: 44px;
}

/* Form card */
.form-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 28px 30px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

    .form-card h2 {
        font-size: 17px;
        font-weight: 700;
        margin-bottom: 4px;
    }

    .form-card .form-sub {
        font-size: 13px;
        color: var(--muted);
        margin-bottom: 24px;
    }

.field-group {
    margin-bottom: 18px;
}

    .field-group > label {
        display: block;
        font-size: 13px;
        font-weight: 600;
        color: var(--text);
        margin-bottom: 6px;
    }

/* Tooltip help icon */
.label-with-help {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

    .label-with-help label {
        font-size: 13px;
        font-weight: 600;
        color: var(--text);
        margin: 0;
    }

.help-icon {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--teal-light);
    color: var(--teal);
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid var(--teal-border);
    transition: all 0.15s;
    user-select: none;
    flex-shrink: 0;
}

    .help-icon:hover {
        background: var(--teal);
        color: white;
        transform: scale(1.1);
    }

.help-wrap {
    position: relative;
    display: inline-flex;
}

.tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--text);
    color: white;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.55;
    padding: 10px 14px;
    border-radius: 8px;
    width: 260px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.18s, visibility 0.18s, transform 0.18s;
    z-index: 100;
    pointer-events: none;
}

    .tooltip::after {
        content: '';
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        border: 6px solid transparent;
        border-top-color: var(--text);
    }

    .tooltip.show {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(-2px);
    }

    .tooltip strong {
        color: #86efac;
        font-weight: 600;
    }

.help-wrap.tooltip-right .tooltip {
    left: 0;
    transform: none;
}

    .help-wrap.tooltip-right .tooltip::after {
        left: 14px;
        transform: none;
    }

    .help-wrap.tooltip-right .tooltip.show {
        transform: translateY(-2px);
    }

.field-group .hint {
    font-size: 11px;
    color: var(--muted);
    font-weight: 400;
    display: block;
    margin-top: 4px;
}

.field-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

input[type=number], input[type=text], select {
    width: 100%;
    height: 44px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 0 14px;
    font-family: inherit;
    font-size: 14px;
    color: var(--text);
    background: var(--white);
    outline: none;
    transition: border-color 0.15s;
}

    input[type=number]:focus, input[type=text]:focus, select:focus {
        border-color: var(--teal);
    }

select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.input-with-prefix {
    position: relative;
}

    .input-with-prefix input {
        padding-left: 28px;
    }

    .input-with-prefix::before {
        content: attr(data-prefix);
        position: absolute;
        left: 12px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--muted);
        font-size: 14px;
        pointer-events: none;
        z-index: 1;
    }

.toggle-row {
    display: flex;
    gap: 6px;
    background: var(--light);
    padding: 4px;
    border-radius: 10px;
    border: 1px solid var(--border);
}

    .toggle-row label, input[type="radio"] {
        flex: 1;
        height: 36px;
        border: none;
        background: transparent;
        font-family: inherit;
        font-size: 13px;
        font-weight: 600;
        color: var(--muted);
        border-radius: 7px;
        cursor: pointer;
        transition: all 0.15s;
    }
    .toggle-row button {
        flex: 1;
        height: 36px;
        border: none;
        background: transparent;
        font-family: inherit;
        font-size: 13px;
        font-weight: 600;
        color: var(--muted);
        border-radius: 7px;
        cursor: pointer;
        transition: all 0.15s;
    }

        .toggle-row button.active {
            background: var(--teal);
            color: var(--white);
            box-shadow: 0 1px 3px rgba(13,148,136,0.3);
        }

/* Results */
.results-card {
    background: var(--teal);
    color: white;
    border-radius: 18px;
    padding: 32px 28px;
    position: sticky;
    top: 24px;
    height: fit-content;
    box-shadow: 0 8px 24px rgba(13,148,136,0.2);
}

.results-eyebrow {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.7);
    margin-bottom: 6px;
}

.results-headline {
    font-size: 15px;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    margin-bottom: 18px;
}

.results-main-amount {
    font-size: 44px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1;
    margin-bottom: 4px;
}

    .results-main-amount sup {
        font-size: 22px;
        vertical-align: super;
        font-weight: 700;
    }

.results-main-period {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 6px;
}

.results-monthly {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    padding: 5px 12px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 24px;
}

.results-divider {
    height: 1px;
    background: rgba(255,255,255,0.15);
    margin: 20px 0 16px;
}

.results-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 7px 0;
    font-size: 13px;
}

    .results-row .label {
        color: rgba(255,255,255,0.8);
    }

    .results-row .value {
        font-weight: 700;
        color: white;
    }

    .results-row.deduct .value {
        color: #fda4af;
    }

    .results-row.positive .value {
        color: #86efac;
    }

.results-cta {
    display: block;
    width: 100%;
    background: var(--gold);
    color: white;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    padding: 13px 20px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    margin-top: 20px;
    text-align: center;
    text-decoration: none;
}

    .results-cta:hover {
        background: #d97706;
    }

.results-disclaimer {
    font-size: 10px;
    color: rgba(255,255,255,0.55);
    margin-top: 10px;
    line-height: 1.5;
    text-align: center;
}

/* Deadline reminder */
.deadline-box {
    background: rgba(255,255,255,0.12);
    border-radius: 10px;
    padding: 12px 14px;
    margin-top: 14px;
    font-size: 11.5px;
    color: rgba(255,255,255,0.9);
    line-height: 1.5;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

    .deadline-box .dicon {
        font-size: 16px;
    }

/* Sections */
.section {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 32px 36px;
    margin-bottom: 24px;
}

.section-title {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
}

    .section-title .num {
        width: 28px;
        height: 28px;
        border-radius: 8px;
        background: var(--teal-light);
        color: var(--teal);
        font-size: 13px;
        font-weight: 800;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

.section-sub {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 20px;
}

@media (max-width: 900px) {
    .calc-grid {
        grid-template-columns: 1fr;
    }

    .results-card {
        position: static;
    }

    .field-grid-2 {
        grid-template-columns: 1fr;
    }

    .page {
        padding: 30px 0px 30px 5px;
    }
}