
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    padding: 20px;
}

.calculator {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    padding: 30px;
    position: relative;
}

h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
}

h2 {
    color: #3498db;
    margin-bottom: 20px;
    font-size: 1.4rem;
}

h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.main-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
    align-items: start;
}

.input-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.results-section {
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding-right: 10px;
    align-self: start;
}

.results-section::-webkit-scrollbar {
    width: 8px;
}

.results-section::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.results-section::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.results-section::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.input-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.label-with-hint {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hint {
    font-size: 0.85rem;
    color: #999;
    font-weight: normal;
}

input[type="number"],
input[type="text"],
select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
}

.checkbox-group label {
    margin: 0;
    font-weight: normal;
}

.collapsible {
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.collapsible-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    cursor: pointer;
    background-color: #e9ecef;
    font-weight: 600;
    color: #495057;
    transition: background-color 0.2s;
}

.collapsible-header:hover {
    background-color: #dee2e6;
}

.collapsible-header .toggle-icon {
    font-size: 1.2rem;
    transition: transform 0.3s;
}

.collapsible-header.active .toggle-icon {
    transform: rotate(180deg);
}

.collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding: 0 15px;
}

.collapsible-content.active {
    padding: 15px;
    max-height: 2000px;
}

.results-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.result-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.result-card.highlight {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.result-card.highlight h3 {
    color: white;
}

.result-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 10px 0;
}

.result-card p {
    margin: 8px 0;
    display: flex;
    justify-content: space-between;
    color: #555;
}

.result-card.highlight p {
    color: rgba(255, 255, 255, 0.9);
}

.result-card p span {
    color: canvastext;
    font-weight: 500;
}

.result-card.highlight p span {
    color: white;
    font-weight: 600;
}

.breakdown-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.breakdown-table th,
.breakdown-table td {
    text-align: left;
    padding: 8px;
    border-bottom: 1px solid #ddd;
}

.breakdown-table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.breakdown-table tr:last-child td {
    border-bottom: none;
    font-weight: 600;
}

.warning {
    background-color: #fff3cd;
    color: #856404;
    padding: 10px;
    border-radius: 5px;
    border-left: 4px solid #ffc107;
    margin-top: 10px;
    font-size: 0.9rem;
}

.buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.print-button {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 10px 20px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s;
}

.print-button:hover {
    background-color: #2980b9;
}

@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background-color: white;
        padding: 0;
    }
    
    .calculator {
        max-width: 100%;
        box-shadow: none;
        padding: 10px;
    }
    
    .main-layout {
        grid-template-columns: 1fr;
    }
    
    .collapsible-content {
        max-height: none !important;
    }
}

@media (max-width: 768px) {
    .main-layout {
        grid-template-columns: 1fr;
    }
    
    .calculator {
        padding: 15px;
    }
    
    .print-button {
        position: static;
        width: 100%;
        margin-bottom: 15px;
    }
    
    .results-section {
        position: static;
        max-height: none;
        overflow-y: visible;
    }
}
    
.csp-note { color: #999; font-size: 0.85rem; }
/* former inline style attributes */
.csp-leas-1 { margin-top: 10px; font-size: 0.9rem; color: #666; }
.csp-leas-2 { font-size: 0.85rem; color: #666; margin-top: 5px; }
.csp-leas-3 { margin-top: 10px; font-size: 0.85rem; }
