/* One stylesheet, no preprocessor, no build step. */

:root {
    --bg: #fdfdfc;
    --fg: #1c1b19;
    --muted: #6b6862;
    --rule: #dedbd4;
    --link: #1a4f8a;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #1b1a18;
        --fg: #e8e5df;
        --muted: #9a958c;
        --rule: #35332f;
        --link: #8fb8e8;
    }
}

html {
    background: var(--bg);
    color: var(--fg);
    font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

body { margin: 0; }

#page {
    max-width: 46rem;
    margin: 0 auto;
    padding: 2rem 1.25rem 4rem;
}

#masthead {
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin: 0 0 1.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--rule);
}

#masthead a { color: inherit; text-decoration: none; }

a { color: var(--link); }

h2 { font-size: 1.25rem; margin: 2rem 0 0.5rem; }

table {
    border-collapse: collapse;
    width: 100%;
    margin: 1rem 0;
}

th, td {
    text-align: left;
    padding: 0.4rem 0.6rem;
    border-bottom: 1px solid var(--rule);
}

th { font-weight: 600; color: var(--muted); }

label { display: block; margin: 0.9rem 0 0.25rem; font-weight: 600; }

input, select, textarea, button {
    font: inherit;
    padding: 0.4rem 0.5rem;
    border: 1px solid var(--rule);
    border-radius: 3px;
    background: var(--bg);
    color: var(--fg);
}

textarea { resize: none; }

button { cursor: pointer; font-weight: 600; }

.error { color: #a3271f; }
.note { color: var(--muted); font-size: 0.9rem; }

/* The search / sort row above the file list. */

/* One row of two forms plus the New link, so each form submits on its own. */

#toolbar {
    margin: 0 0 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--rule);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

#toolbar form {
    margin: 0;
    display: inline;
    align-items: center;
}

label.inline {
    display: inline;
    margin: 0 0 0 0.5rem;
    font-weight: 400;
    color: var(--muted);
}

.button-link {
    padding: 0.4rem 0.7rem;
    border: 1px solid var(--rule);
    border-radius: 3px;
    font-weight: 600;
    text-decoration: none;
}

/* One file in the list. */

.file {
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--rule);
}

.file h2 { margin: 0 0 0.35rem; }

.file .version {
    margin-left: 0.5rem;
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--muted);
}

.file .artist {
    margin: 0 0 0.5rem;
    font-size: 0.9rem;
    color: var(--muted);
}

.file .notes { margin: 0 0 0.75rem; }

.file audio {
    display: block;
    width: 100%;
    margin: 0.5rem 0;
}

.file .note { margin: 0; }

/* The error list on the new-file form. */

ul.errors {
    margin: 1rem 0;
    padding: 0.75rem 1rem 0.75rem 2rem;
    border: 1px solid #a3271f;
    border-radius: 3px;
}

ul.errors li { margin: 0.15rem 0; }

form p .note { margin-left: 0.5rem; }
