* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
.c-matter--article .c-matter__body {
    max-width: 1000px;
    width: 100%;
}
@media (max-width: 1200px) {
    .c-matter--article .c-matter__body {
        max-width: 100%;
    }
}

.cic-body {
    min-height: 100vh;
    padding: 0 20px 20px 20px;
}

.cic-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0px 30px 30px 30px;
}

.cic-header {
    text-align: center;
    margin-bottom: 30px;
}

.cic-header h1 {
    margin-bottom: 10px;
}

.cic-calculator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

/* Tablet and mobile: single column layout */
@media (max-width: 1024px) {
    .cic-calculator-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

.cic-input-section,
.cic-results-section {
    background: #F7FAFC;
    border: 2px solid #F3F4F6;
    border-radius: 8px;
    padding: 24px;
    min-width: 0 !important;
    max-width: 100% !important;
}

/* Sticky form beside results (two-column only — avoids covering stacked results on mobile) */
@media (min-width: 1025px) {
    .cic-input-section {
        position: sticky;
        top: 0;
        z-index: 5;
        max-height: 100vh;
        overflow-y: auto;
    }
}

.cic-input-section h2 {
    margin-bottom: 20px;
}

.cic-input-group {
    margin-bottom: 20px;
}

.cic-input-group label {
    display: block;
    margin-bottom: 8px;
}

.cic-slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    overflow: visible;
}

.cic-slider-header label {
    margin-bottom: 0;
}

/* Stepper (aligned with code/example lifetime-earnings-stepper) */
.cic-stepper-wrapper {
    position: relative;
    display: flex;
    align-items: stretch;
    overflow: visible;
    z-index: 1;
}

.cic-slider-header .cic-stepper-wrapper {
    width: 40%;
    min-width: 100px;
}

.cic-stepper-wrapper .cic-value-display {
    padding-right: 36px;
    width: 100%;
    box-sizing: border-box;
}

.cic-value-display {
    padding: 15px;
    margin: 0;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    min-width: 100px;
    text-align: center;
    outline: none;
    width: 40%;
}

.cic-value-display:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.cic-stepper-wrapper .cic-value-display:focus {
    border-color: #667eea;
}

/* Steppers: show only when pointer is over the field or the input is focused (keyboard/touch) */
.cic-stepper {
    position: absolute;
    right: 8px;
    top: 0;
    bottom: 0;
    margin: auto 0;
    height: fit-content;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 10;
    gap: 3px;
}

.cic-stepper-wrapper:hover .cic-stepper,
.cic-stepper-wrapper:focus-within .cic-stepper {
    opacity: 1;
    pointer-events: auto;
}

.cic-stepper button {
    width: 20px;
    height: 14px;
    border: none;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    font-size: 0;
    line-height: 0;
    box-sizing: border-box;
    flex-shrink: 0;
    transition: color 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.cic-stepper button:hover {
    color: #667eea;
}

.cic-stepper button:active {
    color: #5568d3;
}

/* Host CMS themes sometimes strip ::before; keep triangles rendering in embeds */
.cic-body .cic-stepper .cic-stepper-up::before,
.cic-body .cic-stepper .cic-stepper-down::before {
    content: '' !important;
    display: block !important;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    line-height: 0;
    flex-shrink: 0;
    visibility: visible !important;
}

.cic-body .cic-stepper .cic-stepper-up::before {
    border-bottom: 6px solid currentColor;
    border-top: 0 solid transparent;
}

.cic-body .cic-stepper .cic-stepper-down::before {
    border-top: 6px solid currentColor;
    border-bottom: 0 solid transparent;
}

.cic-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e5e7eb;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    margin: 15px 0;
    position: relative;
}

.cic-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #18b981;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border: 2px solid #fff;
    margin-top: -7px;
}

.cic-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #18b981;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border: 1px solid #ddd;
    box-sizing: border-box;
}

/* Initial Investment slider - matches chart color #667eea */
#cic-initialInvestment::-webkit-slider-thumb {
    background: #667eea;
}

#cic-initialInvestment::-moz-range-thumb {
    background: #667eea;
}

/* Annual Contribution slider - matches chart color #764ba2 */
#cic-annualContribution::-webkit-slider-thumb {
    background: #764ba2;
}

#cic-annualContribution::-moz-range-thumb {
    background: #764ba2;
}

/* Years to Grow slider - matches chart color #f093fb */
#cic-yearsToGrow::-webkit-slider-thumb {
    background: #f093fb;
}

#cic-yearsToGrow::-moz-range-thumb {
    background: #f093fb;
}

.cic-slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    cursor: pointer;
    background: linear-gradient(to right, #ddd 0%, #e5e7eb var(--slider-progress, 0%), #e0e0e0 var(--slider-progress, 0%), #e0e0e0 100%);
    border-radius: 3px;
}

.cic-slider::-moz-range-track {
    width: 100%;
    height: 6px;
    cursor: pointer;
    background: #e0e0e0;
    border-radius: 3px;
}

.cic-slider::-moz-range-progress {
    background: #667eea;
    height: 6px;
    border-radius: 3px;
}

/* Initial Investment slider progress - matches chart color #667eea */
#cic-initialInvestment::-moz-range-progress {
    background: #667eea;
}

#cic-initialInvestment::-webkit-slider-runnable-track {
    background: linear-gradient(to right, #667eea 0%, #667eea var(--slider-progress, 0%), #e0e0e0 var(--slider-progress, 0%), #e0e0e0 100%);
}

/* Annual Contribution slider progress - matches chart color #764ba2 */
#cic-annualContribution::-moz-range-progress {
    background: #764ba2;
}

#cic-annualContribution::-webkit-slider-runnable-track {
    background: linear-gradient(to right, #764ba2 0%, #764ba2 var(--slider-progress, 0%), #e0e0e0 var(--slider-progress, 0%), #e0e0e0 100%);
}

/* Years to Grow slider progress - matches chart color #f093fb */
#cic-yearsToGrow::-moz-range-progress {
    background: #f093fb;
}

#cic-yearsToGrow::-webkit-slider-runnable-track {
    background: linear-gradient(to right, #f093fb 0%, #f093fb var(--slider-progress, 0%), #e0e0e0 var(--slider-progress, 0%), #e0e0e0 100%);
}

.cic-slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    color: #666;
}

.cic-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.cic-input-wrapper.cic-stepper-wrapper input {
    padding-right: 36px;
}

.cic-input-wrapper .cic-currency {
    position: absolute;
    left: 12px;
    z-index: 1;
}

.cic-input-wrapper .cic-unit {
    position: absolute;
    right: 50px;
    z-index: 1;
}

.cic-input-wrapper input {
    width: 100%;
    padding: 15px;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    transition: all 0.3s ease;
    margin: 0;
}

.cic-input-wrapper input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.cic-calculate-btn {
    width: 100%;
}

.cic-results-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.cic-result-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #e2e8f0;
    transition: all 0.3s ease;
}

.cic-result-label, .cic-result-value {
    color: #666;
}

.cic-result-label {
    margin-bottom: 5px;
    font-weight: 500;
    margin-top: 0;
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}

.cic-result-value {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.cic-result-card.cic-primary {
    padding: 26px;
    text-align: center;
    border: 1px solid #e2e8f0;
    background: linear-gradient(135deg, #f093fb 0%, #667eea 50%, #764ba2 100%);
    /* border: 2px solid rgba(16, 185, 129, 0.3); */
    padding: 26px;
    color:#fff;
    font-weight: bold;
}

.cic-result-card.cic-primary h2 {
    color:#fff!important;
    margin: 10px;
}

.cic-result-card.cic-primary .cic-result-label, .cic-result-card.cic-primary .cic-result-value {
    color:#fff;
}

.cic-result-card-2, .cic-result-card-3 {
    display: none;
}


.cic-quote {
    text-align: left;
    background: none;
    border: none;
    border-radius: 0;
    padding: 10px;
    font-style: italic;
    color: #666;
}
.cic-quote h3 {
    font-size: 1.2rem;
    line-height: 1.2;
}
.cic-result-label {
    margin-bottom: 5px;
}

.cic-chart-section {
    margin: 25px 0;
}

.cic-chart-section h3 {
    margin-bottom: 15px;
}

.cic-chart-container {
    position: relative;
    height: 300px;
    background: white;
    border-radius: 10px;
    padding: 20px;
}

.cic-chart-overlay {
    position: absolute;
    top: 35%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
    pointer-events: none;
    padding: 15px;
    min-width: 120px;
    font-size: 14px;
    display: none;
}

.cic-chart-overlay .cic-future-value {
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 1.2em;
}

.cic-future-value-label {
    display: none;
}

.cic-action-buttons {
    margin-top: 25px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.cic-start-over-btn,
.cic-download-btn {
    flex: 1;
    min-width: 150px;
}

.cic-start-over-btn:active,
.cic-download-btn:active {
    transform: translateY(0);
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .cic-calculator-grid {
        gap: 20px;
    }
    
    .cic-container {
        padding: 0 20px 20px 20px;
    }
    
    .cic-input-section,
    .cic-results-section {
        padding: 20px;
    }
    
    .cic-chart-container {
        height: 250px;
    }
    
    .cic-chart-overlay {
        top: 30%;
    }

    .cic-slider-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .cic-slider-header label {
        width: 100%;
        margin-bottom: 0;
    }

    .cic-slider-header .cic-stepper-wrapper {
        width: 100%;
        max-width: none;
    }

    .cic-value-display {
        text-align: left;
        min-width: 0;
        width: 100%;
    }

    .cic-input-wrapper input {
        text-align: left;
    }

    .cic-action-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .cic-start-over-btn,
    .cic-download-btn {
        width: 100%;
        flex: none;
    }
}

/* Small mobile optimizations */
@media (max-width: 480px) {
    .cic-body {
        padding: 10px;
    }
    
    .cic-container {
        padding: 15px;
    }
    
    .cic-input-section,
    .cic-results-section {
        padding: 15px;
    }
    
    .cic-chart-container {
        height: 200px;
        padding: 15px;
    }
    
    .cic-chart-overlay {
        top: 50%;
    }

    .cic-result-value {
        font-size: 2rem;
    }
}

.cic-disclosure {
    margin-top: 40px;
    padding: 20px;
    border-top: 2px solid #e2e8f0;
}

.cic-disclosure p {
    font-size: 0.875rem;
    line-height: 1.6;
    color: #64748b;
    text-align: left;
    margin: 0;
}

@media (max-width: 768px) {
    .cic-disclosure {
        margin-top: 30px;
        padding: 15px;
    }
    
    .cic-disclosure p {
        font-size: 0.8125rem;
    }
}

/* ADMIN OVERRIDES */
.c-matter--article .c-matter__body {
    max-width: 1000px;
    width: 100%;
}

@media (max-width: 1200px) {
    .c-matter--article .c-matter__body {
        max-width: 100%;
    }
}