/* Deliberately small and boring. This is a login page: it must render before
   anything else has loaded, work at any width, and never be the reason
   somebody cannot sign in. */

:root {
    color-scheme: light dark;
    --ink: #1a1a1a;
    --paper: #fdfdfc;
    --muted: #666;
    --line: #d8d5cf;
    --accent: #2f5d50;
    --warn: #9b2226;
}

@media (prefers-color-scheme: dark) {
    :root {
        --ink: #e8e6e1;
        --paper: #17181a;
        --muted: #9a978f;
        --line: #33353a;
        --accent: #7fbfa8;
        --warn: #f08a86;
    }
}

* { box-sizing: border-box; }

body {
    margin: 0;
    padding: 2rem 1rem;
    background: var(--paper);
    color: var(--ink);
    font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}

main { max-width: 26rem; margin: 0 auto; }

h1 { font-size: 1.25rem; letter-spacing: 0.02em; }
h1 a { color: inherit; text-decoration: none; }
h2 { font-size: 1rem; margin-bottom: 0.25rem; }

section { margin: 1.5rem 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }

label { display: block; margin-top: 0.75rem; font-size: 0.9rem; color: var(--muted); }

input {
    width: 100%;
    padding: 0.5rem;
    margin-top: 0.25rem;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--paper);
    color: var(--ink);
    font: inherit;
}

button {
    margin-top: 1rem;
    padding: 0.55rem 1rem;
    border: 1px solid var(--accent);
    border-radius: 4px;
    background: var(--accent);
    color: var(--paper);
    font: inherit;
    cursor: pointer;
}

button:disabled { opacity: 0.6; cursor: progress; }

button small { font-size: 0.75em; opacity: 0.8; }

/* The alternative to whatever the User-Agent suggested. A button because it
   runs a ceremony rather than going anywhere, styled as a link because it is
   the second choice. */
button.linky {
    margin-top: 0.5rem;
    padding: 0;
    border: 0;
    background: none;
    color: var(--accent);
    font-size: 0.85rem;
    text-align: left;
    text-decoration: underline;
}

form.inline { display: inline; }
form.inline button {
    margin: 0 0 0 0.5rem;
    padding: 0.15rem 0.5rem;
    font-size: 0.8rem;
    background: transparent;
    color: var(--muted);
    border-color: var(--line);
}

ul { padding-left: 1.1rem; }
li { margin-bottom: 0.6rem; }

.muted { color: var(--muted); font-size: 0.85rem; display: block; }
.note { color: var(--muted); }
.error { color: var(--warn); font-weight: 600; }

.badge {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.05rem 0.45rem;
    color: var(--muted);
}

/* Admin lists put a select and a button on one line beside the item they act
   on, so the select must sit inline rather than inherit the block form's
   full-width layout. */
form.inline select {
    padding: 0.15rem;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--paper);
    color: var(--ink);
    font: inherit;
    font-size: 0.8rem;
}
