:root {
    --lc-primary: #002857;
    --lc-secondary: #ad1c20;
    --lc-primary-20: rgba(0, 40, 87, 0.12);
    --lc-secondary-10: rgba(173, 28, 32, 0.10);
    --lc-bg: #fff;
    --lc-muted: #666;
}

/* base */
.lc-masud-wrap {
    margin: 18px auto;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    color: #111;
}

.lc-form {
    background: var(--lc-bg);
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 4px 18px rgba(17, 17, 17, 0.06);
    margin-bottom: 12px;
}

.lc-row {
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
}

/* sliders */
.lc-slider-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.lc-slider-row input[type="range"] {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    background: linear-gradient(90deg, var(--lc-primary) 0%, var(--lc-primary) 40%, #ccc 40%);
    border-radius: 6px;
}

.lc-slider-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 40, 87, 0.22);
    border: 2px solid var(--lc-primary);
    cursor: pointer;
}

.lc-slider-row input[type="number"] {
    width: 140px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
}

.lc-row label {
    font-weight: 600;
    margin-bottom: 6px;
    display: block;
    font-size: 0.95rem;
}

.options-row {
    display: flex;
    gap: 12px;
    align-items: center;
    font-weight: 500;
}

/* buttons — primary & ghost variant */
.lc-btn {
    background: var(--lc-primary);
    color: #fff;
    padding: 10px 14px;
    border-radius: 10px;
    border: 0;
    cursor: pointer;
    font-weight: 700;
    box-shadow: 0 6px 18px var(--lc-primary-20);
}

.lc-btn--ghost {
    background: transparent;
    color: var(--lc-primary);
    border: 1px solid rgba(0, 40, 87, 0.12);
    box-shadow: none;
}

/* results */
.lc-results {
    margin-top: 12px;
}

.lc-card {
    background: var(--lc-bg);
    padding: 14px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(17, 17, 17, 0.04);
    margin-bottom: 12px;
}

.lc-card-title {
    font-weight: 800;
    margin-bottom: 8px;
    font-size: 1.02rem;
}

/* two-column */
.lc-grid-two {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.lc-grid-two>div {
    flex: 1;
    min-width: 260px;
}

/* grid items */
.lc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.lc-grid-item {
    background: #f7f9ff;
    padding: 10px;
    border-radius: 8px;
}

.lc-label {
    font-size: 0.85rem;
    color: #445;
    margin-bottom: 6px;
}

.lc-value {
    font-size: 1.1rem;
    font-weight: 800;
}

/* chart styling and legend (use theme colors) */
#lc-pie-chart {
    max-width: 100%;
    height: auto;
    margin-top: 6px;
}

.lc-chart-legend {
    display: flex;
    gap: 10px;
    margin-top: 8px;
    align-items: center;
}

.legend-principal::before,
.legend-interest::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 6px;
    border-radius: 2px;
    vertical-align: middle;
}

.legend-principal::before {
    background: var(--lc-primary);
}

.legend-interest::before {
    background: var(--lc-secondary);
}

/* hidden / amort table / footnote */
.lc-hidden {
    display: none;
}

.lc-amort-table {
    width: 100%;
    border-collapse: collapse;
}

.lc-footnote {
    font-size: 0.85rem;
    color: var(--lc-muted);
    margin-top: 8px;
}

@media (max-width:800px) {
    .lc-grid-two {
        flex-direction: column;
    }

    .lc-slider-row input[type="number"] {
        width: 110px;
    }
}
.lc-chart-wrapper {
    width: 200px;
    max-width: 200px;
    margin: 0 auto;
}
select#lc-loan-type {
    padding: 12px;
    border-radius: 6px;
}