.risk-calculator {
    max-width: 900px;
    margin: 20px auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: #fafafa;
    border-radius: 10px;
}

.risk-calculator p {
	margin-bottom: 20px;
}

.risk-calculator h2 {
    color: #262730;
    text-align: center;
    margin-bottom: 10px;
}

.calculator-row {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.customer-section {
    flex: 1;
    min-width: 300px;
    padding: 20px;
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.customer-section h3 {
    margin-top: 0;
    color: #262730;
    border-bottom: 2px solid #ff2b2b;
    padding-bottom: 5px;
}

.customer-section label {
    display: block;
    margin-bottom: 15px;
    font-weight: 500;
    color: #262730;
}

.customer-section input,
.customer-section select {
    width: 100%;
    padding: 8px 12px;
    margin-top: 5px;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.customer-section input:focus,
.customer-section select:focus {
    outline: none;
    border-color: #ff2b2b;
    box-shadow: 0 0 0 1px #ff2b2b;
}

button[type="submit"] {
    background: #ff2b2b;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    display: block;
    margin: 20px auto;
    transition: background-color 0.2s;
}

button[type="submit"]:hover {
    background: #e02424;
}

button[type="submit"]:disabled {
    background: #999 !important;
    cursor: not-allowed;
    opacity: 0.7;
}

/* RESULTS STYLING - Match form width and layout */
.results-container {
    max-width: 900px; /* Match calculator container */
    margin: 40px auto 0;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.results-section {
    flex: 1;
    min-width: 300px; /* Match customer-section min-width */
    padding: 30px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #e1e5e9;
}

.results-section h3 {
    color: #262730;
    margin-top: 0;
    font-size: 1.5em;
    border-bottom: 2px solid #ff2b2b;
    padding-bottom: 10px;
}

.confidence-indicator {
    background: #f0f2f6;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 25px;
    text-align: center;
    color: #262730;
    border-left: 4px solid #ff2b2b;
}

.risk-metric {
    margin-bottom: 30px;
    padding: 20px;
    background: #fafafa;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
}

.risk-metric h4 {
    margin: 0 0 15px 0;
    color: #262730;
    font-size: 1.1em;
    font-weight: 600;
}

.metric-container {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

/* Left-aligned primary metric (not centered) */
.primary-metric {
    text-align: left; /* Changed from center */
    flex-shrink: 0;
}

.primary-metric.centered {
    text-align: left; /* Override centered class */
}

.metric-value {
    font-size: 2.5em;
    font-weight: bold;
    margin-bottom: 5px;
    line-height: 1;
}

.actual-value {
    color: #ff2b2b;
}

.metric-label {
    font-size: 0.9em;
    color: #6c757d;
    font-weight: 500;
    margin-top: 5px;
}

.explanation-toggle {
    cursor: pointer;
    color: #0073aa;
    font-weight: 500;
    padding: 8px 0;
    border-top: 1px solid #e1e5e9;
    margin-top: 15px;
    user-select: none;
}

.explanation-toggle:hover {
    color: #005a87;
}

.explanation {
    padding: 15px 0 5px 0;
    color: #495057;
    line-height: 1.5;
    border-top: 1px solid #e1e5e9;
    margin-top: 10px;
}

.warning {
    background: #fff3cd;
    color: #856404;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #ffeaa7;
    margin: 15px 0;
}

/* Responsive design for mobile */
@media (max-width: 768px) {
    .calculator-row {
        flex-direction: column;
    }
    
    .results-container {
        flex-direction: column;
        gap: 20px;
    }
    
    .results-section {
        min-width: unset;
    }
    
    .metric-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .metric-value {
        font-size: 2em; /* Slightly smaller on mobile */
    }
}

/* Additional responsive breakpoint for tablets */
@media (max-width: 1024px) and (min-width: 769px) {
    .results-container {
        gap: 15px;
    }
    
    .results-section {
        min-width: 280px;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

.results-section h3 {
    scroll-margin-top: 30px;
}
