/* BorderRelay — authentication pages.
   Moved out of the layout into its own stylesheet: the Content-Security-Policy
   forbids inline styles, and an external file is the correct answer to that
   rather than weakening the policy.
   Deliberately NOT merged into app.css: these pages use their own token names
   (--bg, --text, --primary) and merging two :root blocks would let one theme
   silently overwrite the other. Auth pages load this file and nothing else. */

/* Design tokens — build specification §10, contrast measured (phase 1 plan §6).
   Auth pages follow the system preference; the stored user preference
   applies after login, in the application shell. */
:root {
    --bg: #ffffff;
    --surface: #faf8f4;
    --surface-2: #f2efe8;
    --text: #141414;
    --text-muted: #5a5a5a;
    --primary: #1F4E79;
    --primary-2: #2E75B6;
    --accent: #F5B400;
    --accent-text: #8a6508;      /* 5.32 on white — corrected token */
    --border: #e4e1da;           /* decorative only */
    --border-strong: #8a8478;    /* 3.72 — functional edges */
    --danger: #a4262c;
    --focus: #2E75B6;
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #121a22;
        --surface: #1a232d;
        --surface-2: #222e3a;
        --text: #e8eaed;
        --text-muted: #9aa5b1;
        --primary: #7db3e3;
        --primary-2: #a8cdf0;
        --accent: #F5B400;
        --accent-text: #f0c04a;
        --border: #2c3a47;
        --border-strong: #5c7488;   /* 3.60 on dark bg */
        --danger: #f28b91;
        --focus: #a8cdf0;
    }
}

* { box-sizing: border-box; margin: 0; }

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    line-height: 1.55;
}

.card {
    width: 100%;
    max-width: 420px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: 3px solid var(--primary);
    padding: 32px;
}

.wordmark { margin-bottom: 28px; }
.wordmark .name {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.01em;
}
.wordmark .byline {
    font-size: 10px;
    font-weight: 600;
    color: var(--accent-text);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-top: 2px;
}

h1 { font-size: 17px; margin-bottom: 6px; }
.lede { color: var(--text-muted); font-size: 13.5px; margin-bottom: 22px; }

label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 16px 0 5px;
}

input[type="email"], input[type="password"], input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    font-size: 15px;
    font-family: inherit;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--border-strong);
    border-radius: 0;
}
input:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 1px;
    border-color: var(--focus);
}

button[type="submit"] {
    width: 100%;
    margin-top: 22px;
    padding: 11px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    color: #ffffff;
    background: var(--primary);
    border: none;
    cursor: pointer;
}
@media (prefers-color-scheme: dark) {
    /* --primary is a light blue in dark mode: 7.9 against dark text,
       unreadable with white. Dark text on light button instead. */
    button[type="submit"] { color: #121a22; }
}
button[type="submit"]:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

.errors {
    background: var(--surface-2);
    border-left: 3px solid var(--danger);
    color: var(--text);
    font-size: 13.5px;
    padding: 10px 14px;
    margin-bottom: 16px;
}

.hint { font-size: 12.5px; color: var(--text-muted); margin-top: 8px; }

.kicker {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent-text);
    border-bottom: 2px solid var(--accent);
    display: inline-block;
    padding-bottom: 2px;
    margin-bottom: 10px;
}

code.mono {
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
    background: var(--surface-2);
    padding: 1px 5px;
    font-size: 13px;
}
