/* Linked and not inline: the Content-Security-Policy on this service is
   `default-src 'none'; style-src 'self'`, which refuses an inline <style>
   block. Keeping the policy strict costs one file. */

:root {
    color-scheme: light dark;
    --ink: #1a1a1a;
    --paper: #fdfdfc;
    --line: #d8d5cf;
    --alert: #a2231d;
    --calm: #2c6350;
}

@media (prefers-color-scheme: dark) {
    :root {
        --ink: #ecebe8;
        --paper: #17181a;
        --line: #3a3d42;
        --alert: #f08a84;
        --calm: #74c2a2;
    }
}

body {
    margin: 0;
    padding: 2rem 1rem;
    background: var(--paper);
    color: var(--ink);
    font: 1rem/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}

main {
    max-width: 22rem;
    margin: 3rem auto;
}

h1 {
    font-size: 1.375rem;
    font-weight: 600;
    margin: 0 0 1.5rem;
}

label {
    display: block;
    margin: 1rem 0 0.25rem;
    font-size: 0.875rem;
}

input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.5rem 0.625rem;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--paper);
    color: inherit;
    font: inherit;
}

button {
    margin-top: 1.5rem;
    width: 100%;
    padding: 0.625rem;
    border: 1px solid transparent;
    border-radius: 4px;
    background: var(--ink);
    color: var(--paper);
    font: inherit;
    font-weight: 500;
    cursor: pointer;
}

.error {
    margin: 0 0 1rem;
    padding: 0.625rem 0.75rem;
    border-left: 3px solid var(--alert);
    color: var(--alert);
    font-size: 0.9375rem;
}

/* Said, not warned about: a confirmation and an error must not look the
   same, or people learn to skip both. */
.notice {
    margin: 0 0 1rem;
    padding: 0.625rem 0.75rem;
    border-left: 3px solid var(--calm);
    color: var(--calm);
    font-size: 0.9375rem;
}

/* Under a field: what becomes of what is typed in it. */
.hint {
    margin: 0.375rem 0 0;
    font-size: 0.8125rem;
}

/* The way back to the other door, on every page that is one door. */
.aside {
    margin: 1.5rem 0 0;
    font-size: 0.875rem;
}

a {
    color: inherit;
}

p.lead {
    margin: 0 0 1.25rem;
    font-size: 0.9375rem;
}

/* An invitation code, shown once. Monospace and spaced out because it
   gets read aloud and typed by hand, and 'is that a one or an l' is a
   question hex never has to answer. */
.code {
    margin: 0 0 1.25rem;
    padding: 0.75rem;
    border: 1px dashed var(--line);
    border-radius: 4px;
    font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    font-size: 1.0625rem;
    letter-spacing: 0.06em;
    text-align: center;
    word-break: break-all;
    user-select: all;
}
