.llcs-calculator {
    --llcs-ink: #172033;
    --llcs-muted: #667085;
    --llcs-line: #d9e0e8;
    --llcs-soft: #f6f8fb;
    --llcs-accent: #143d73;
    --llcs-accent-2: #245ea8;
    --llcs-white: #ffffff;
    width: 100%;
    max-width: 1180px;
    min-width: 0;
    margin: 30px auto;
    padding: 0;
    color: var(--llcs-ink);
    font-family: inherit;
    font-size: 16px;
    line-height: 1.6;
    text-align: left;
    isolation: isolate;
    container-type: inline-size;
    container-name: llcs;
}

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

.llcs-calculator form,
.llcs-calculator section,
.llcs-calculator aside,
.llcs-calculator div,
.llcs-calculator label {
    min-width: 0;
}

.llcs-calculator h2,
.llcs-calculator h3,
.llcs-calculator p {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: none !important;
    color: inherit;
    text-transform: none !important;
    letter-spacing: normal;
}

.llcs-calculator strong,
.llcs-calculator small,
.llcs-calculator span {
    text-transform: none;
}

.llcs-header {
    margin: 0 0 22px;
    padding: 24px 26px;
    border: 1px solid #dbe6f3;
    border-radius: 18px;
    background: linear-gradient(135deg, #eef4fb 0%, #ffffff 76%);
    box-shadow: none;
}

.llcs-header h2 {
    margin: 3px 0 8px !important;
    font-size: clamp(25px, 4cqi, 34px) !important;
    font-weight: 800 !important;
    line-height: 1.25 !important;
    color: var(--llcs-ink) !important;
}

.llcs-header > p:last-child {
    max-width: 780px;
    color: #475467;
    font-size: 15px;
    line-height: 1.75;
}

.llcs-kicker {
    display: block;
    color: var(--llcs-accent-2) !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    line-height: 1.4 !important;
    letter-spacing: 0.12em !important;
}

.llcs-layout {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, 1.7fr) minmax(310px, 0.8fr);
    gap: 22px;
    align-items: start;
}

.llcs-form,
.llcs-result-card,
.llcs-disclaimer {
    width: 100%;
    min-width: 0;
    margin: 0;
    background: var(--llcs-white);
    border: 1px solid var(--llcs-line);
    border-radius: 16px;
    box-shadow: 0 7px 24px rgba(23, 32, 51, 0.055);
    overflow: hidden;
}

.llcs-section {
    margin: 0;
    padding: 23px 24px;
    border: 0;
    border-bottom: 1px solid #edf0f4;
    background: transparent;
}

.llcs-section:last-of-type {
    border-bottom: 0;
}

.llcs-section-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
}

.llcs-section-heading > span {
    display: inline-flex;
    flex: 0 0 29px;
    align-items: center;
    justify-content: center;
    width: 29px;
    height: 29px;
    margin: 0;
    border-radius: 50%;
    background: var(--llcs-accent);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
}

.llcs-section-heading h3 {
    font-size: 20px !important;
    font-weight: 800 !important;
    line-height: 1.35 !important;
    color: var(--llcs-ink) !important;
}

.llcs-grid {
    display: grid;
    gap: 16px 18px;
}

.llcs-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.llcs-field {
    display: flex !important;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    color: #344054;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
}

.llcs-field > span:first-child {
    display: block;
    min-height: 20px;
}

.llcs-field small {
    display: block;
    min-height: 17px;
    margin: 0 !important;
    color: var(--llcs-muted);
    font-size: 12px !important;
    font-weight: 400;
    line-height: 1.45;
}

.llcs-field input[type="number"],
.llcs-field select {
    appearance: auto;
    -webkit-appearance: auto;
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    min-height: 48px !important;
    height: 48px !important;
    margin: 0 !important;
    padding: 10px 12px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 9px !important;
    outline: none !important;
    background: #fff !important;
    background-image: none;
    box-shadow: none !important;
    color: #101828 !important;
    font: inherit !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    line-height: 1.25 !important;
    text-align: left !important;
    text-indent: 0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.llcs-field select {
    cursor: pointer;
}

.llcs-field input[type="number"]:focus,
.llcs-field select:focus {
    border-color: var(--llcs-accent-2) !important;
    box-shadow: 0 0 0 3px rgba(36, 94, 168, 0.14) !important;
}

.llcs-calculator .llcs-money-input {
    display: grid !important;
    grid-template-columns: 38px minmax(0, 1fr) !important;
    align-items: stretch !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 48px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 9px !important;
    background: #ffffff !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.llcs-calculator .llcs-money-input:focus-within {
    border-color: var(--llcs-accent-2) !important;
    box-shadow: 0 0 0 3px rgba(36, 94, 168, 0.14) !important;
}

.llcs-calculator .llcs-money-symbol {
    position: static !important;
    z-index: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 38px !important;
    min-width: 38px !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
    border-right: 1px solid #e2e8f0 !important;
    background: #f8fafc !important;
    color: #475569 !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    text-align: center !important;
    pointer-events: none !important;
    box-sizing: border-box !important;
}

.llcs-calculator .llcs-money-input input[type="number"] {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 46px !important;
    min-height: 46px !important;
    margin: 0 !important;
    padding: 10px 12px !important;
    border: 0 !important;
    border-radius: 0 !important;
    outline: 0 !important;
    background: #ffffff !important;
    box-shadow: none !important;
    color: #111827 !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    line-height: 1.35 !important;
    text-indent: 0 !important;
    letter-spacing: normal !important;
    box-sizing: border-box !important;
    font-variant-numeric: tabular-nums;
}

.llcs-calculator .llcs-money-input input[type="number"]:focus {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
}

.llcs-actions-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    margin: 17px 0 0;
}

.llcs-calculator .llcs-secondary-button,
.llcs-calculator .llcs-reset-button {
    all: unset;
    box-sizing: border-box;
    display: inline-flex !important;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
    padding: 9px 15px !important;
    border: 1px solid #b9c7d8 !important;
    border-radius: 999px !important;
    background: #fff !important;
    box-shadow: none !important;
    color: var(--llcs-accent) !important;
    font-family: inherit !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
    text-align: center !important;
    text-decoration: none !important;
    white-space: normal;
    cursor: pointer;
}

.llcs-calculator .llcs-secondary-button:hover,
.llcs-calculator .llcs-reset-button:hover {
    background: #eef4fb !important;
    border-color: #8fa6c1 !important;
}

.llcs-calculator .llcs-secondary-button:focus-visible,
.llcs-calculator .llcs-reset-button:focus-visible {
    outline: 3px solid rgba(36, 94, 168, 0.22) !important;
    outline-offset: 2px;
}

.llcs-calculator button::before,
.llcs-calculator button::after {
    display: none !important;
    content: none !important;
}

.llcs-form-footer {
    padding: 0 24px 23px;
}

.llcs-results {
    position: sticky;
    top: 24px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    min-width: 0;
}

.llcs-result-card {
    padding: 20px;
}

.llcs-result-primary {
    padding: 24px;
    border-color: transparent;
    background: linear-gradient(135deg, #153b6d, #245ea8);
    color: #fff;
}

.llcs-result-primary > span,
.llcs-result-primary > small {
    display: block;
    color: rgba(255, 255, 255, 0.84);
}

.llcs-result-primary > span {
    font-size: 14px;
    font-weight: 700;
}

.llcs-result-primary > small {
    font-size: 12px;
}

.llcs-result-primary strong {
    display: block;
    max-width: 100%;
    margin: 7px 0 5px;
    color: #fff;
    font-size: clamp(34px, 6cqi, 50px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.035em;
    overflow-wrap: anywhere;
}

.llcs-result-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid #edf0f4;
}

.llcs-result-row:first-child {
    padding-top: 0;
}

.llcs-result-row:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.llcs-result-row span,
.llcs-breakdown span {
    color: var(--llcs-muted);
    font-size: 13px;
    line-height: 1.45;
}

.llcs-result-row strong,
.llcs-breakdown strong {
    flex: 0 0 auto;
    color: var(--llcs-ink);
    font-size: 17px;
    font-weight: 800;
    line-height: 1.35;
    text-align: right;
    overflow-wrap: anywhere;
}

.llcs-result-card h3 {
    margin: 0 0 12px !important;
    font-size: 17px !important;
    font-weight: 800 !important;
    line-height: 1.4 !important;
    color: var(--llcs-ink) !important;
}

.llcs-breakdown {
    display: grid;
    gap: 0;
}

.llcs-breakdown > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f2f5;
}

.llcs-breakdown > div:last-child {
    border-bottom: 0;
}

.llcs-status-card {
    border-left: 5px solid #98a2b3;
}

.llcs-status-card[data-status="danger"] { border-left-color: #d92d20; }
.llcs-status-card[data-status="warning"] { border-left-color: #f79009; }
.llcs-status-card[data-status="caution"] { border-left-color: #fdb022; }
.llcs-status-card[data-status="good"] { border-left-color: #12b76a; }
.llcs-status-card[data-status="excellent"] { border-left-color: #039855; }

.llcs-status-label {
    display: block;
    margin: 0 0 4px;
    color: var(--llcs-muted);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.4;
    letter-spacing: 0.08em;
}

.llcs-status-card strong {
    display: block;
    margin: 0 0 6px;
    color: var(--llcs-ink);
    font-size: 17px;
    font-weight: 800;
    line-height: 1.45;
}

.llcs-status-card p {
    color: #475467 !important;
    font-size: 13px !important;
    line-height: 1.65 !important;
}

.llcs-negative {
    color: #d92d20 !important;
}

.llcs-disclaimer {
    padding: 17px 19px;
    color: #667085;
    font-size: 12px;
    line-height: 1.7;
}

.llcs-disclaimer p {
    margin: 0 0 6px !important;
    color: inherit !important;
    font-size: inherit !important;
    line-height: inherit !important;
}

.llcs-disclaimer p:last-child {
    margin-bottom: 0 !important;
}

.llcs-source-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 11px;
}

.llcs-source-links a {
    color: var(--llcs-accent-2) !important;
    font-size: 12px !important;
    text-decoration: underline !important;
    text-underline-offset: 2px;
}

@container llcs (max-width: 960px) {
    .llcs-layout {
        grid-template-columns: 1fr;
    }

    .llcs-results {
        position: static;
        top: auto;
        grid-template-columns: 1fr;
    }
}

@container llcs (max-width: 720px) {
    .llcs-grid-2 {
        grid-template-columns: 1fr;
    }

    .llcs-field small {
        min-height: 0;
    }
}

@container llcs (max-width: 500px) {
    .llcs-calculator {
        margin: 20px 0;
    }

    .llcs-header {
        padding: 20px 18px;
        border-radius: 14px;
    }

    .llcs-header h2 {
        font-size: 24px !important;
    }

    .llcs-section,
    .llcs-result-card {
        padding: 19px 17px;
    }

    .llcs-form-footer {
        padding: 0 17px 19px;
    }

    .llcs-actions-inline {
        flex-direction: column;
        align-items: stretch;
    }

    .llcs-calculator .llcs-secondary-button,
    .llcs-calculator .llcs-reset-button {
        width: 100%;
    }

    .llcs-result-row,
    .llcs-breakdown > div {
        gap: 8px;
    }

    .llcs-result-row strong,
    .llcs-breakdown strong {
        font-size: 16px;
    }
}

@supports not (container-type: inline-size) {
    @media (max-width: 1100px) {
        .llcs-layout {
            grid-template-columns: 1fr;
        }

        .llcs-results {
            position: static;
            top: auto;
            grid-template-columns: 1fr;
        }
    }

    @media (max-width: 760px) {
        .llcs-grid-2 {
            grid-template-columns: 1fr;
        }
    }
}
