/* One stylesheet for every auth server page; tokens follow the StatusTick Ink design system (light only). */
@font-face {
    font-family: "Switzer";
    src: url("/assets/fonts/Switzer-Regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    color-scheme: light;
    --canvas: #f4f2f0;
    --surface: #ffffff;
    --surface-sunken: #ece9e5;
    --ink: #0c0a08;
    --ink-muted: #636261;
    --hairline: #e3e0dc;
    --action: #0c0a08;
    --action-ink: #f4f2f0;
    --action-hover: #2b2926;
    --down: #d92d20;
    --down-soft: #fbe9e7;
    --down-ink: #a51c12;
    --focus-ring: 0 0 0 2px var(--canvas), 0 0 0 4px var(--action);
}

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

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    background: var(--canvas);
    color: var(--ink);
    font-family: "Switzer", "Helvetica Neue", Arial, sans-serif;
    font-size: 0.9375rem;
    font-weight: 400;
    line-height: 1.5;
}

strong {
    font-weight: 400;
    color: var(--ink);
}

.brand {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.brand svg {
    display: block;
    width: 145px;
    height: 24px;
}

.card {
    width: 100%;
    max-width: 420px;
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: 12px;
}

.card.wide {
    max-width: 520px;
}

h1 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.lead {
    margin-bottom: 1.5rem;
    color: var(--ink-muted);
}

h1 + form,
h1 + .alert,
h1 + .notice {
    margin-top: 1.5rem;
}

.field {
    margin-bottom: 1.25rem;
}

label,
legend {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--ink);
    font-size: 0.875rem;
    font-weight: 400;
}

input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    height: 40px;
    padding: 0 0.75rem;
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--hairline);
    border-radius: 10px;
    font: inherit;
}

input::placeholder {
    color: var(--ink-muted);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
    border-color: var(--ink);
}

input:focus-visible,
button:focus-visible,
a:focus-visible {
    outline: 2px solid transparent;
    box-shadow: var(--focus-ring);
}

.label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

.label-row label {
    margin-bottom: 0;
}

.optional {
    color: var(--ink-muted);
    font-size: 0.8125rem;
}

.hint {
    margin-top: 0.35rem;
    color: var(--ink-muted);
    font-size: 0.8125rem;
}

.field-error {
    margin-top: 0.35rem;
    color: var(--down-ink);
    font-size: 0.8125rem;
}

.alert,
.notice {
    margin-bottom: 1.25rem;
    padding: 0.7rem 0.8rem;
    border-radius: 10px;
    font-size: 0.875rem;
}

.alert {
    background: var(--down-soft);
    color: var(--down-ink);
}

.notice {
    background: var(--surface-sunken);
    color: var(--ink);
}

button,
.button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 40px;
    padding: 0 1rem;
    background: var(--action);
    color: var(--action-ink);
    border: 1px solid transparent;
    border-radius: 6px;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 400;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

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

button.secondary,
.button.secondary {
    background: var(--surface);
    color: var(--ink);
    border-color: var(--hairline);
}

button.secondary:hover,
.button.secondary:hover {
    background: var(--surface-sunken);
}

button.danger,
button.danger:hover {
    background: var(--down);
    color: #ffffff;
}

button.small {
    display: inline-flex;
    width: auto;
    height: 32px;
    padding: 0 0.75rem;
}

button.link {
    display: inline;
    width: auto;
    height: auto;
    padding: 0;
    background: none;
    color: var(--ink);
    border: none;
    text-decoration: underline;
}

button.link:hover {
    background: none;
}

a {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.links {
    margin-top: 1.5rem;
    color: var(--ink-muted);
    font-size: 0.875rem;
    text-align: center;
}

.links a,
.links button.link {
    margin: 0 0.25rem;
    font-size: 0.875rem;
}

.divider {
    margin: 1.25rem 0 0.75rem;
    color: var(--ink-muted);
    font-size: 0.8125rem;
    text-align: center;
}

.stack > * + * {
    margin-top: 0.5rem;
}

fieldset {
    margin-bottom: 1.25rem;
    border: none;
}

.choice {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-bottom: 0.5rem;
    padding: 0.7rem 0.8rem;
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: 10px;
    color: var(--ink);
    font-size: 0.9375rem;
    cursor: pointer;
}

.choice:has(input:checked) {
    border-color: var(--ink);
}

.choice input {
    margin-top: 0.3rem;
    accent-color: var(--action);
}

.buttons {
    display: flex;
    gap: 0.75rem;
}

.rows {
    width: 100%;
    margin-bottom: 0.5rem;
    border-collapse: collapse;
}

.rows td {
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--hairline);
}

.rows td:last-child {
    text-align: right;
}

.rows .hint {
    margin-top: 0;
}

ul.plain {
    margin: 0 0 1.5rem 1.25rem;
}

.qr-code {
    display: block;
    margin: 0 auto 1.25rem;
}

ul.recovery-codes {
    columns: 2;
    list-style: none;
    margin-left: 0;
}

@media (max-width: 480px) {
    .card {
        padding: 20px;
    }
}
