body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background: #fff;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-radius: 8px;
}

header h1 {
    margin-top: 0;
    color: #2c3e50;
}

.reference-image {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.formula-box {
    font-size: 1.5em;
    text-align: center;
    padding: 20px;
    background-color: #f4f4f4;
    border-radius: 5px;
    margin: 20px 0;
}

hr {
    border: 0;
    height: 1px;
    background: #ddd;
    margin: 40px 0;
}

.input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.input-group {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.input-group h3 {
    margin-top: 0;
    font-size: 1.1em;
    border-bottom: 2px solid #ddd;
    padding-bottom: 5px;
}

label {
    display: block;
    margin-top: 10px;
    font-weight: 500;
    font-size: 0.9em;
}

.sync-pair {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sync-pair input[type="range"] {
    flex-grow: 1;
}

.sync-pair input[type="number"] {
    width: 70px;
    padding: 4px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Dynamic Output Styling */
.narrative-box {
    background-color: #fff3cd;
    border-left: 5px solid #ffc107;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 0 4px 4px 0;
}

.narrative-box h4 {
    margin-top: 0;
    color: #856404;
}

.impact-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.impact-table th, .impact-table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: center;
}

.impact-table th {
    background-color: #f8f9fa;
    font-weight: bold;
}

.impact-table td:first-child {
    text-align: left;
}

.pass { color: #198754; font-weight: bold; }
.fail { color: #dc3545; font-weight: bold; }

/* Tab Navigation Styles */
.tab-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
}

.tab-btn {
    padding: 10px 20px;
    cursor: pointer;
    background: #f4f4f4;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.95em;
    color: #555;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    background: #e9ecef;
}

.tab-btn.active {
    background: #2c3e50;
    color: #fff;
    border-color: #2c3e50;
}

.hidden {
    display: none !important;
}

/* Updated Narrative Box for Single Assessment */
.narrative-box.single-mode {
    background-color: #e2e3e5;
    border-left: 5px solid #6c757d;
}
.narrative-box.single-mode h4, .narrative-box.single-mode p {
    color: #383d41;
}