/* ── The account pages: sign in, create an account, codes, passwords ──────
 *
 * One narrow card in the middle of a light page. The same shape for every
 * step, so moving from "sign in" to "check your email" to "choose a new
 * password" reads as one task rather than five different screens.
 *
 * The primary button is full width inside the card: on a phone that is where
 * the thumb already is, and on a desktop a card this narrow has no "right
 * side" for a small button to sit on.
 * ───────────────────────────────────────────────────────────────────────── */
.au-page {
    background: var(--surface-alt);
    padding: 3rem 16px 4.5rem;
}
.au-card {
    max-width: 440px;
    margin: 0 auto;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 2rem 1.75rem 1.75rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .05);
}
.au-card--wide { max-width: 520px; }
@media (max-width: 480px) {
    .au-page { padding: 1.5rem 12px 3rem; }
    .au-card { padding: 1.5rem 1.15rem 1.35rem; }
}

.au-card h1 {
    margin: 0 0 .4rem;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--ink);
}
/* Without a lede under it (sign in), the heading still needs air before the
   first control. */
.au-card h1:not(:has(+ .au-lede)) { margin-bottom: 1.3rem; }
.au-lede {
    margin: 0 0 1.4rem;
    font-size: .94rem;
    line-height: 1.6;
    color: var(--ink-soft);
}
.au-lede strong { color: var(--ink); }

.au-form { display: grid; gap: 1rem; margin: 0; }
.au-field { display: grid; gap: .35rem; }
.au-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; }
.au-field label {
    font-size: .86rem;
    font-weight: 700;
    color: var(--ink);
}
.au-opt { font-weight: 500; font-size: .78rem; color: var(--ink-muted); }
.au-label-row a { font-size: .82rem; color: var(--brand); font-weight: 600; }
.au-field input {
    width: 100%;
    padding: .74rem .85rem;
    font: inherit;
    font-size: 1rem;           /* 16px: below that iOS zooms the page on focus */
    color: var(--ink);
    background: var(--surface);
    border: 1px solid #cbd5e1;
    border-radius: 10px;
}
.au-field input:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 1px;
    border-color: transparent;
}
.au-field input[aria-invalid="true"] { border-color: #b3261e; }
.au-row { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 420px) { .au-row { grid-template-columns: 1fr; } }

.au-pw { position: relative; }
.au-pw input { padding-right: 4.2rem; }
.au-pw-toggle {
    position: absolute;
    top: 50%;
    right: .4rem;
    transform: translateY(-50%);
    padding: .35rem .6rem;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--brand);
    font: inherit;
    font-size: .8rem;
    font-weight: 700;
    cursor: pointer;
}
.au-pw-toggle:hover { background: var(--surface-alt); }

.au-help { margin: 0; font-size: .8rem; line-height: 1.55; color: var(--ink-muted); }
.au-field-error { margin: 0; font-size: .83rem; line-height: 1.5; color: #b3261e; font-weight: 600; }

.au-alert {
    margin: 0 0 1.1rem;
    padding: .75rem .9rem;
    border-radius: 10px;
    font-size: .9rem;
    line-height: 1.55;
    border: 1px solid #f1c9c5;
    background: #fdf3f2;
    color: #8c1d18;
}
.au-alert--ok { border-color: #c9d8f5; background: #f2f6fd; color: var(--brand-dark); }

.au-submit {
    display: block;
    width: 100%;
    margin-top: .3rem;
    padding: .85rem 1.2rem;
    border: 0;
    border-radius: 10px;
    background: var(--brand);
    color: #fff;
    font: inherit;
    font-size: .98rem;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
}
.au-submit:hover { background: var(--brand-dark); }

.au-or {
    display: flex;
    align-items: center;
    gap: .8rem;
    margin: 1.3rem 0;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ink-muted);
}
.au-or::before, .au-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.au-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .65rem;
    width: 100%;
    padding: .78rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: var(--surface);
    color: var(--ink);
    font-size: .95rem;
    font-weight: 600;
    text-decoration: none;
}
.au-google:hover { background: var(--surface-alt); color: var(--ink); }
.au-google svg { width: 18px; height: 18px; flex: none; }

.au-switch {
    margin: 1.4rem 0 0;
    padding-top: 1.15rem;
    border-top: 1px solid var(--line);
    text-align: center;
    font-size: .9rem;
    color: var(--ink-soft);
}
.au-switch a { color: var(--brand); font-weight: 700; }
.au-fine {
    margin: .9rem 0 0;
    text-align: center;
    font-size: .8rem;
    line-height: 1.6;
    color: var(--ink-muted);
}
.au-fine a { color: var(--ink-soft); text-decoration: underline; }

/* The code field: one large monospaced box, read at a glance against the
   message beside it. */
.au-field input.au-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: .45em;
    text-align: center;
    padding: .7rem .5rem .7rem .95rem;
}

.au-resend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: .35rem;
    margin: 1.1rem 0 0;
    font-size: .88rem;
    color: var(--ink-soft);
}
.au-resend form { margin: 0; display: inline; }
.au-linkbtn {
    padding: 0;
    border: 0;
    background: none;
    color: var(--brand);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Honeypot: off-screen rather than display:none, see .sub-trap. */
.au-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* "Continue with password": the email form folded behind a second button,
   the same size and shape as Google's so the two read as a pair of equal
   choices inside the card, with "or" between them. A <details>, so it opens
   without JavaScript. */
.au-reveal { margin: 0; }
.au-reveal-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
    list-style: none;
    padding: .78rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: var(--surface);
    text-align: center;
    font-size: .95rem;
    font-weight: 600;
    color: var(--ink);
    cursor: pointer;
}
.au-reveal-btn::-webkit-details-marker { display: none; }
.au-reveal-btn::marker { content: ""; }
.au-reveal-btn:hover { background: var(--surface-alt); }
.au-reveal-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.au-reveal[open] > .au-reveal-btn { display: none; }
.au-reveal[open] > .au-form { margin-top: 0; }
