:root {
    --score-size: 60px;
}

.flag-form {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
}

.flag-field {
    position: relative;
    box-sizing: border-box;
    resize: none;
    width: 100%; 
    font-family: monospace; 
    font-size: 12px; 
    border: 1px solid black;
}

.flag-field:focus {
    outline: 2px black solid;
}

.submit-button {
    box-sizing: border-box;
    cursor: pointer;
    margin-top: 12px;
    width: 100%;
    padding: 10px;
    font-weight: bold;
    font-size: 20px;
    border-radius: 30px;
    border: 1px solid black;
    background-color: black;
    color: white;
}

.submit-button:hover:not(:active) {
    background-color: white;
    color: black;
}

.submit-button:hover:active {
    margin-top: 10px;
    background-color: white;
    color: black;
    border-top-width: 3px;
    border-right-width: 3px;
}

.page-main {
    height: 100%;
    flex-grow: 1;
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    margin-top: 20px;
    margin-bottom: 20px;
}

.page-footer {
    display: flex;
    justify-content: space-evenly;
    padding: 20px;
    border-top: 1px solid black;
}

.page-footer ul {
    margin: 0;
    padding: 0;
}

.page-footer li {
    display: inline;
}

.page-footer :not(:last-child) {
    padding-right: 10px;
}

.page-header {
    margin: 10px 0 0 0;
}

.flag-description {
    width: 100%;
    margin: 0 0 10px 0;
}
    
body { 
    padding-left: 10px;
    padding-right: 10px;
    font-family: sans-serif; 
    max-width: 700px; 
    margin: 0 auto; 
    min-height: 100vh; 
    display: flex;
    flex-direction: column;
}
    
.flag-page .ok  { color: green; background: #efffef; padding: .5em; border-left: 4px solid green; width: 100%; box-sizing: border-box; }
    
.flag-page .err { color: darkred; background: #fff0f0; padding: .5em; border-left: 4px solid red; width: 100%;  box-sizing: border-box; }

.scoreboard table { 
    border-collapse: separate;
    border-spacing: 0;
}

.scoreboard {
    overflow-x: scroll;
    position: relative;
}

.scoreboard th, td { border: 1px solid #ccc; padding: 4px 8px; text-align: center; }

.scoreboard th { background: #f0f0f0; white-space: nowrap; }

.scoreboard td.student { 
    text-align: left; 
    background: white;
    font-size: small;
}

.scoreboard td.score { 
    font-weight: bold; 
    background: white;
}

.scoreboard .score {
    position: sticky;
    left: 0;
    min-width: var(--score-size);
    max-width: var(--score-size);
}

@media only screen and (max-width: 600px) {
    .scoreboard .student {
        max-width: 80px;
    }
}

.scoreboard .student {
    position: sticky;
    left: 77px;
    border-right: 3px solid #ccc;
    overflow: hidden;
    text-overflow: ellipsis;
    text-wrap: nowrap;
}

.scoreboard .ok { background: #c6efce; }

.scoreboard .no { background: #fce4ec; color: #aaa; }

.scoreboard td :nth-child(even) { background: #fafafa; }
