/*
    One stylesheet, no framework, no font download.

    The box is bandwidth-capped and every byte here is served from it. A CSS
    framework would be more bytes than the entire rest of the site, for a layout
    that is a column of forms.
*/

:root {
    --ink: #12151a;
    --paper: #f6f4f0;
    --panel: #ffffff;
    --edge: #d9d4cc;
    --muted: #5d6470;
    --ember: #b8410f;
    --ember-dark: #8f3009;
    --good: #1c6b3f;
    --bad: #a32020;
}

@media (prefers-color-scheme: dark) {
    :root {
        --ink: #e8e6e1;
        --paper: #14171c;
        --panel: #1c2027;
        --edge: #2e343d;
        --muted: #98a1af;
        --ember: #e8632c;
        --ember-dark: #ff7d45;
        --good: #4bbd7d;
        --bad: #ff6b6b;
    }
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

header {
    border-bottom: 1px solid var(--edge);
    background: var(--panel);
}

nav {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    max-width: 60rem;
    margin: 0 auto;
    padding: 0.9rem 1.25rem;
}

nav .spacer { flex: 1; }

.brand {
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
    text-decoration: none;
    color: var(--ink);
}

.brand span { color: var(--ember); }

nav a {
    color: var(--muted);
    text-decoration: none;
}

nav a:hover { color: var(--ink); }

main {
    max-width: 60rem;
    margin: 0 auto;
    padding: 2.5rem 1.25rem 4rem;
}

.narrow { max-width: 26rem; margin: 0 auto; }

h1 { font-size: 1.9rem; letter-spacing: -0.02em; margin: 0 0 0.4rem; }
h2 { font-size: 1.25rem; margin: 2.25rem 0 0.75rem; }

.lede { color: var(--muted); margin-top: 0; }

.panel {
    background: var(--panel);
    border: 1px solid var(--edge);
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0.9rem 0 0.3rem;
}

input[type=text], input[type=email], input[type=password], input[type=number], select {
    width: 100%;
    padding: 0.6rem 0.7rem;
    border: 1px solid var(--edge);
    border-radius: 6px;
    background: var(--paper);
    color: var(--ink);
    font: inherit;
}

input:focus, select:focus {
    outline: 2px solid var(--ember);
    outline-offset: 1px;
}

.hint { font-size: 0.8rem; color: var(--muted); margin: 0.3rem 0 0; }

button, .button {
    display: inline-block;
    margin-top: 1.1rem;
    padding: 0.6rem 1.1rem;
    border: 0;
    border-radius: 6px;
    background: var(--ember);
    color: #fff;
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

button:hover, .button:hover { background: var(--ember-dark); }

.button.small { margin-top: 0; padding: 0.4rem 0.8rem; font-size: 0.9rem; }

.linkish {
    margin: 0;
    padding: 0;
    background: none;
    color: var(--muted);
    font-weight: 400;
}

.linkish:hover { background: none; color: var(--ink); }

form.inline { display: inline; }

.notice, .error, .success {
    padding: 0.7rem 0.9rem;
    border-radius: 6px;
    border: 1px solid var(--edge);
    margin: 1rem 0;
    font-size: 0.92rem;
}

.error { border-color: var(--bad); color: var(--bad); }
.success { border-color: var(--good); color: var(--good); }

.game {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--edge);
}

.game:last-child { border-bottom: 0; }
.game h3 { margin: 0; font-size: 1.05rem; }
.game .meta { color: var(--muted); font-size: 0.85rem; }

.empty { color: var(--muted); font-style: italic; }

/* Codes are read aloud and typed by hand, so they are shown in a face where a
   zero cannot be mistaken for an O. */
code, .code {
    font-family: ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
    font-size: 0.95em;
    letter-spacing: 0.04em;
}

table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 0.45rem 0.5rem; border-bottom: 1px solid var(--edge); }
th { color: var(--muted); font-weight: 600; }

/* A table of codes or accounts must never widen the page on a phone. */
.scrolls { overflow-x: auto; }

footer {
    border-top: 1px solid var(--edge);
    color: var(--muted);
    font-size: 0.85rem;
    padding: 1.25rem;
    text-align: center;
}
