body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    color: #222;
    background-color: #ffffff;
}

header {
    background-color: #1c3d5a;
    color: white;
    padding: 15px 20px;
}

header h1 {
    margin: 0 0 10px 0;
    font-size: 1.5em;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 20px;
}

nav a {
    color: white;
    text-decoration: underline;
}

nav a:focus {
    outline: 3px solid #ffbf47;
    outline-offset: 2px;
}

main {
    max-width: 700px;
    margin: 20px auto;
    padding: 0 20px;
}

footer {
    text-align: center;
    padding: 15px;
    font-size: 0.9em;
    color: #555;
}

.skip-link {
    position: absolute;
    left: -1000px;
    top: 0;
    background: #1c3d5a;
    color: white;
    padding: 10px;
}

.skip-link:focus {
    left: 10px;
}

label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
}

.help-text {
    font-size: 0.9em;
    color: #555;
    margin-top: 5px;
}

input[type="file"] {
    margin-bottom: 5px;
}

button {
    background-color: #1c3d5a;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 1em;
    cursor: pointer;
    margin-top: 15px;
}

button:hover {
    background-color: #14293d;
}

button:focus {
    outline: 3px solid #ffbf47;
    outline-offset: 2px;
}

.drop-zone {
    display: block;
    border: 2px dashed #7d97ad;
    background-color: #f7f9fb;
    padding: 40px 20px;
    margin-top: 15px;
    text-align: center;
    cursor: pointer;
    font-weight: normal;
}

.drop-zone:hover {
    background-color: #eef3f8;
    border-color: #1c3d5a;
}

/* the file input inside is visually hidden, so show the focus ring on the whole box */
.drop-zone:focus-within {
    outline: 3px solid #ffbf47;
    outline-offset: 2px;
}

.drop-zone-active {
    background-color: #e3edf5;
    border-color: #1c3d5a;
    border-style: solid;
}

.drop-zone-icon {
    display: block;
    width: 48px;
    height: 48px;
    margin: 0 auto 10px auto;
    fill: #7d97ad;
}

.drop-zone-title {
    display: block;
    font-size: 1.3em;
    font-weight: bold;
    color: #1c3d5a;
}

.drop-zone-hint {
    display: block;
    margin-top: 5px;
    color: #555;
}

.file-list {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
}

.file-row {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background-color: #ffffff;
    padding: 8px 12px;
    margin-bottom: 8px;
}

.file-name {
    flex: 1;
    min-width: 0;
    color: #222;
    word-break: break-word;
}

.file-size {
    font-size: 0.85em;
    color: #555;
    white-space: nowrap;
}

.file-remove {
    background-color: transparent;
    color: #8c2f2b;
    font-size: 1.5em;
    line-height: 1;
    padding: 2px 10px;
    margin-top: 0;
    border-radius: 4px;
}

.file-remove:hover {
    background-color: #f2dede;
}

.chosen-file {
    margin-top: 10px;
    color: #555;
}

.chosen-file-selected {
    color: #3c763d;
    font-weight: bold;
}

.flash-message {
    background-color: #fff3cd;
    border: 1px solid #d9a441;
    padding: 10px 15px;
    margin-bottom: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

th, td {
    text-align: left;
    padding: 10px;
    border-bottom: 1px solid #ccc;
}

.status-badge {
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 0.9em;
}

.status-received {
    background-color: #d9edf7;
    color: #31708f;
}

.status-error {
    background-color: #f2dede;
    color: #a94442;
}

.status-processing {
    background-color: #fff3cd;
    color: #7a5b00;
}

.status-queued {
    background-color: #e8eaed;
    color: #444;
}

.status-done {
    background-color: #dff0d8;
    color: #3c763d;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.progress-box {
    background-color: #f7f9fb;
    border: 1px solid #7d97ad;
    padding: 15px 20px;
    margin: 15px 0;
}

.progress-box h3 {
    margin-top: 0;
}

.progress-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}

progress {
    flex: 1;
    height: 22px;
    /* modern browsers colour the bar with accent-color instead of the older rules below */
    accent-color: #1c3d5a;
}

progress::-webkit-progress-bar {
    background-color: #e3e9ef;
}

progress::-webkit-progress-value {
    background-color: #1c3d5a;
}

progress::-moz-progress-bar {
    background-color: #1c3d5a;
}

.delete-form {
    margin-top: 20px;
}

.delete-button {
    background-color: #8c2f2b;
    padding: 8px 15px;
    margin-top: 0;
    font-size: 0.95em;
}

.delete-button:hover {
    background-color: #6d2422;
}

/* inside the submissions table the button should sit tight in its cell */
td .delete-form {
    margin-top: 0;
}

.progress-percent {
    min-width: 45px;
    text-align: right;
    font-weight: bold;
    color: #1c3d5a;
}

.error-box {
    background-color: #f2dede;
    border: 1px solid #a94442;
    color: #a94442;
    padding: 10px 15px;
    margin: 15px 0;
}

.error-box ol {
    margin: 5px 0 15px 0;
    padding-left: 20px;
}

.error-box li {
    margin-bottom: 5px;
}

.download-link {
    display: inline-block;
    background-color: #1c3d5a;
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    margin-top: 5px;
}

.download-link:hover {
    background-color: #14293d;
}

.download-link:focus {
    outline: 3px solid #ffbf47;
    outline-offset: 2px;
}

.report-text {
    white-space: pre-wrap;
    background-color: #f7f7f7;
    border: 1px solid #ccc;
    padding: 10px;
}
.tab-bar {
    display: flex;
    gap: 4px;
    margin: 15px 0 0 0;
    border-bottom: 2px solid #ccc;
}

.tab-button {
    background-color: #eef1f4;
    color: #1c3d5a;
    margin-top: 0;
    padding: 10px 16px;
    font-size: 0.95em;
    border-radius: 6px 6px 0 0;
}

.tab-button:hover {
    background-color: #dfe5ea;
}

.tab-button-chosen {
    background-color: #1c3d5a;
    color: white;
}

/* after the hover rule above, or hovering the chosen tab would leave white text
   on a pale background */
.tab-button-chosen:hover {
    background-color: #14293d;
}

.tab-panel {
    padding-top: 12px;
}

.score-line {
    background-color: #ffffff;
    border: 1px solid #dce0e4;
    border-left: 4px solid #1c3d5a;
    border-radius: 6px;
    padding: 14px 18px;
    margin: 0 0 12px 0;
    color: #555;
}

.score {
    font-size: 1.9em;
    color: #222;
    margin-right: 4px;
}

.overview-list {
    background-color: #ffffff;
    border: 1px solid #dce0e4;
    border-radius: 6px;
    padding: 12px 18px 12px 34px;
    margin: 0;
    color: #444;
}

.overview-list li {
    margin-bottom: 4px;
}

.problem-list {
    list-style: none;
    border: 1px solid #dce0e4;
    border-radius: 6px;
    background-color: #ffffff;
    padding: 0;
    margin: 0 0 10px 0;
}

.problem-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    border-top: 1px solid #ebeef1;
    padding: 11px 16px;
}

.problem-item:first-child {
    border-top: none;
}

.problem-kind {
    font-size: 0.7em;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: white;
    padding: 3px 6px;
    min-width: 62px;
    text-align: center;
    white-space: nowrap;
    height: fit-content;
}

/* worst first, so the colour says how much it matters at a glance */
.severity-critical { background-color: #7a1f1b; }
.severity-serious  { background-color: #8c2f2b; }
.severity-moderate { background-color: #8a5a00; }
.severity-minor    { background-color: #4a5a6a; }

.problem-where {
    display: block;
    font-size: 0.85em;
    color: #555;
}

.problem-body {
    flex: 1;
    min-width: 0;
}

.problem-detail {
    color: #222;
}

.slide-nav {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 15px 0 10px 0;
}

.slide-nav button {
    margin-top: 0;
    padding: 8px 14px;
    font-size: 0.95em;
}

.slide-counter {
    flex: 1;
    text-align: center;
    margin: 0;
    font-weight: bold;
    color: #1c3d5a;
}

.slide-panel {
    border: 1px solid #dce0e4;
    border-radius: 6px;
    padding: 14px 18px;
    margin-bottom: 8px;
}

.slide-heading {
    margin: 0 0 8px 0;
    color: #1c3d5a;
}

.slide-clear {
    color: #3c763d;
    margin: 0 0 10px 0;
}

.shape-list {
    list-style: none;
    padding: 10px 12px;
    margin: 0;
}

.shape-item {
    display: flex;
    gap: 10px;
    padding: 8px 0;
    border-top: 1px solid #eee;
}

.shape-kind {
    font-size: 0.7em;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 3px 6px;
    min-width: 52px;
    text-align: center;
    height: fit-content;
    background-color: #e8eaed;
    color: #444;
}

.shape-kind-image {
    background-color: #1c3d5a;
    color: white;
}

.shape-kind-generated {
    background-color: #3c763d;
    color: white;
    min-width: 78px;
}

.shape-body {
    flex: 1;
    min-width: 0;
}

.shape-name {
    display: block;
    font-size: 0.85em;
    color: #555;
}

.shape-text {
    display: block;
    color: #222;
    word-break: break-word;
}

.shape-text-empty {
    color: #777;
    font-style: italic;
}

.report-link {
    display: inline-block;
    border: 1px solid #1c3d5a;
    border-radius: 6px;
    color: #1c3d5a;
    text-decoration: none;
    padding: 8px 16px;
    margin-top: 10px;
    font-size: 0.95em;
}

.report-link:hover {
    background-color: #1c3d5a;
    color: white;
}

.report-link:focus {
    outline: 3px solid #ffbf47;
    outline-offset: 2px;
}
