.sac-standings {
    margin: 1.5em 0;
    font-size: 0.95em;
}

.sac-standings-asof {
    font-style: italic;
    color: #555;
    margin-bottom: 0.75em;
}

.sac-standings-notice {
    font-style: italic;
    color: #777;
}

.sac-standings-scroll {
    overflow-x: auto;
}

.sac-standings-table {
    border-collapse: collapse;
}

.sac-standings-table th,
.sac-standings-table td {
    border: 1px solid #ddd;
    padding: 4px 8px;
    text-align: center;
    white-space: nowrap;
}

.sac-standings-table thead th {
    background: #1a2a4a;
    color: #fff;
    font-weight: bold;
}

.sac-class-header td {
    background: #eef1f7;
    font-weight: bold;
    text-align: left;
}

.sac-dropped {
    text-decoration: line-through;
    color: #999;
}

.sac-bestn {
    font-weight: bold;
}

.sac-tbc {
    color: #999;
    font-style: italic;
}

/* Event key -- a small, compact reference table, not stretched full width */
.sac-event-key {
    margin-bottom: 1.25em;
    width: auto;
}

.sac-event-key caption {
    caption-side: top;
    text-align: left;
    font-weight: bold;
    margin-bottom: 0.4em;
}

.sac-event-key th,
.sac-event-key td {
    text-align: left;
    white-space: normal;
}

/* Main standings grid -- Name/Club/Car need real room; event columns are just
   two-digit point values under a short code, so they should stay narrow. */
.sac-standings-table:not(.sac-event-key) {
    width: 100%;
    min-width: 700px;
}

/* Full width on a phone (there's little room to spare); on anything wider,
   70% keeps it from stretching edge-to-edge across the content column. */
@media (min-width: 768px) {
    .sac-standings-table:not(.sac-event-key) {
        width: 70%;
    }
}

.sac-standings-table:not(.sac-event-key) th:nth-child(1),
.sac-standings-table:not(.sac-event-key) td:nth-child(1) {
    text-align: left;
    white-space: normal;
    min-width: 160px;
}

.sac-standings-table:not(.sac-event-key) th:nth-child(2),
.sac-standings-table:not(.sac-event-key) td:nth-child(2) {
    text-align: left;
    white-space: normal;
    min-width: 140px;
}

.sac-standings-table:not(.sac-event-key) th:nth-child(3),
.sac-standings-table:not(.sac-event-key) td:nth-child(3) {
    text-align: left;
    white-space: normal;
    min-width: 160px;
}

.sac-event-col {
    width: 46px;
}

.sac-awards-table td:nth-child(3) {
    text-align: left;
}

/* Marshal entry form */
.sac-marshal-form {
    max-width: 480px;
    border: 1px solid #ddd;
    padding: 1em 1.25em;
    margin-bottom: 1.5em;
    background: #fafafa;
}

.sac-marshal-form label {
    font-size: 0.9em;
}

.sac-marshal-form select,
.sac-marshal-form input[type="text"],
.sac-marshal-form input[type="date"],
.sac-marshal-form textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 6px 8px;
    margin-top: 3px;
}

.sac-marshal-form button {
    padding: 8px 18px;
    background: #1a2a4a;
    color: #fff;
    border: none;
    cursor: pointer;
}

.sac-marshal-messages {
    list-style: none;
    margin: 0 0 1em;
    padding: 0;
}

.sac-marshal-messages li {
    padding: 8px 12px;
    margin-bottom: 6px;
    border-radius: 3px;
}

.sac-marshal-success {
    background: #e6f4ea;
    color: #1e4620;
}

.sac-marshal-error {
    background: #fbe7e7;
    color: #611a1a;
}

.sac-marshal-pending {
    background: #fff6e0;
    color: #6b5300;
}

.sac-marshal-recheck-form {
    margin: 0.5em 0 2em;
}

.sac-marshal-recheck-form button {
    padding: 6px 14px;
    background: #555;
    color: #fff;
    border: none;
    cursor: pointer;
}
