#scenario-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-start;
    flex-direction: row;
    margin-top: 10px;
}

#scenario-form label {
    font-size: 0.9em;
    margin-bottom: 2px;
}

#scenario-form input[type="number"] {
    width: 50px;
}

#scenario-form input[type="text"] {
    width: 150px;
}

#update-scenario {
    padding: 5px 10px;
    cursor: pointer;
}

#matrices-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
}

.matrix-section {
    border: 1px solid #ccc;
    padding: 10px;
    flex: 1 1 45%;
    margin-bottom: 20px;
    text-align: center;
}

table {
    width: auto;
    margin-left: auto;
    margin-right: auto;
    border-collapse: collapse;
    table-layout: auto;
}

td, th {
    border: 1px solid #999;
    text-align: center;
    padding: 5px;
}

/* base reset for our custom tables */
table.custom-table {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    border-collapse: collapse;
    table-layout: auto;
}

/* headers: no borders, keep padding & alignment */
table.custom-table th {
    border: none !important;
    text-align: center;
    padding: 5px;
}

/* but for the first column in the body, right‐align text */
table.custom-table tbody th {
    text-align: right;
    width: 100px;
}

/* only data‐cells get the solid border */
table.custom-table td {
    border: 1px solid #999;
    text-align: center;
    padding: 5px;
}

@media screen and (max-width: 800px) {
    .matrix-section {
        flex: 1 1 100%;
    }
}
