/**
 * Mental Compound Interest Calculator
 */

.ck-calc {
    font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
    max-width: 580px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--surface-primary, #ffffff);
    border-radius: 16px;
    border: 1px solid var(--border, rgba(0, 0, 0, 0.08));
}

.ck-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.ck-slider-group {
    width: 100%;
}

.ck-slider-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--text-secondary, #555);
    margin-bottom: 0.25rem;
}

.ck-slider-val {
    font-weight: 600;
    font-family: var(--font-mono, 'SF Mono', Monaco, monospace);
    color: var(--text-primary, #1d1d1f);
}

.ck-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--surface-secondary, #e5e5e5);
    outline: none;
}

.ck-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent, #2563eb);
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.ck-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.ck-stat {
    text-align: center;
    padding: 1rem;
    background: var(--surface-secondary, #f5f5f7);
    border-radius: 12px;
}

.ck-stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-mono, 'SF Mono', Monaco, monospace);
    color: var(--accent, #2563eb);
    margin-bottom: 0.25rem;
}

.ck-stat-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-tertiary, #888);
}

.ck-stat-unit {
    display: block;
    font-size: 0.7rem;
    color: var(--text-tertiary, #aaa);
}

.ck-chart {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 180px;
    padding-top: 20px;
    margin-bottom: 1rem;
}

.ck-bar-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
}

.ck-bar {
    width: 100%;
    max-width: 24px;
    background: var(--accent, #2563eb);
    border-radius: 4px 4px 0 0;
    transition: height 0.3s ease;
    cursor: help;
    min-height: 2px;
}

.ck-bar-label {
    font-size: 0.65rem;
    color: var(--text-tertiary, #888);
    margin-top: 4px;
}

.ck-note {
    font-size: 0.8rem;
    color: var(--text-tertiary, #888);
    text-align: center;
    line-height: 1.5;
    font-style: italic;
}

@media (max-width: 600px) {
    .ck-calc {
        padding: 1.25rem;
        margin: 1rem auto;
    }
    .ck-stats {
        grid-template-columns: 1fr;
    }
    .ck-bar-label {
        display: none;
    }
}
