.auth-page {
    min-height: 100dvh;
}

.auth-main {
    padding: 80px 16px 48px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.auth-card {
    background: var(--color-card);
    border-radius: var(--radius-xl);
    padding: 40px 32px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
}

/* Mid-flow the card carries a recap block, which needs the heading tighter
   against it than a bare form does. */
.auth-card h1 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--color-dark);
}

.auth-card.has-recap h1 {
    margin-bottom: 16px;
}

/* ===== Step strip: prompts ✓ · design ✓ · account =====
   Only rendered mid-create-flow, where all three states are true. */
.auth-steps {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.auth-steps li {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

/* The connector is drawn by the item rather than a separate element so the
   strip stays a plain <ol> for screen readers. */
.auth-steps li + li::before {
    content: "";
    width: 14px;
    height: 1px;
    background: var(--color-border);
}

.auth-steps li.is-done {
    color: var(--color-accent);
}

/* The tick is a pseudo-element: it is decoration next to a word that already
   says which step it is. */
.auth-steps li.is-done::after {
    content: "✓";
    font-size: 0.8125rem;
    line-height: 1;
}

.auth-steps li.is-current {
    color: var(--color-dark);
    font-weight: 600;
}

/* ===== "Ready to save" recap ===== */
.auth-recap {
    border: 1px solid var(--color-border);
    border-left: 3px solid var(--color-accent);
    border-radius: var(--radius-md);
    background: var(--color-bg);
    padding: 14px 16px;
    margin-bottom: 24px;
}

.auth-recap-label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 6px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-accent);
}

.auth-recap-tick {
    flex-shrink: 0;
}

/* The host's own words, in the display face the rest of the product uses for
   their event. Long names wrap; nothing here is truncated. */
.auth-recap-name {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 600;
    line-height: 1.25;
    color: var(--color-dark);
    overflow-wrap: anywhere;
}

.auth-recap-meta {
    margin: 4px 0 0;
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.auth-card .field {
    margin-bottom: 16px;
}

.auth-card .field-label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 0.9375rem;
    color: var(--color-text);
}

/* Label on the left, "Show" on the right, sharing the label's baseline so the
   toggle costs no vertical space. */
.field-label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.password-toggle {
    border: none;
    background: none;
    padding: 0 0 8px;
    font-family: var(--font-body);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--color-primary);
    cursor: pointer;
}

.password-toggle:hover {
    text-decoration: underline;
}

/* Says the rule before the server does. The old third field existed to catch
   a typo; this plus the toggle catch it without asking for another box. */
.field-hint {
    margin: 6px 0 0;
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

/* The unticked "send me tips" box above both ways in (register.html). */
.auth-consent {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: 0 0 16px;
    font-size: 0.9375rem;
    line-height: 1.4;
}

.auth-consent input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
}

.auth-consent label {
    cursor: pointer;
}

.auth-consent .field-hint {
    display: block;
    margin-top: 2px;
}

.auth-card input[type="email"],
.auth-card input[type="password"],
.auth-card input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-family: var(--font-body);
    background: var(--color-bg);
    outline: none;
    transition: border-color 0.2s;
}

.auth-card input:focus {
    border-color: var(--color-primary);
}

.auth-error {
    color: var(--color-error);
    font-size: 0.875rem;
    margin-bottom: 12px;
    padding: 10px 14px;
    background: rgba(196, 83, 74, 0.08);
    border-radius: var(--radius-sm);
}

.auth-notice {
    color: var(--color-text);
    font-size: 0.875rem;
    margin-bottom: 12px;
    padding: 10px 14px;
    background: rgba(74, 144, 100, 0.08);
    border-radius: var(--radius-sm);
}

.auth-help {
    font-size: 0.9375rem;
    color: var(--color-text-muted);
    margin-bottom: 20px;
}

/* ===== Google / OAuth button ===== */
.btn-oauth {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 16px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-bg);
    color: var(--color-dark);
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}

.btn-oauth:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-sm);
}

.btn-oauth-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* "or" divider between the OAuth button and the email form */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: var(--color-text-muted);
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--color-border);
}

/* ===== Under the button =====
   What it costs, then who we are. Both sit below the CTA rather than above
   it: they answer the doubts of someone already reaching for the button, and
   a page that argues its own trustworthiness before being asked reads as a
   page with something to answer for. */
.auth-reassure {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 14px 0 0;
    font-size: 0.875rem;
    line-height: 1.45;
    color: var(--color-text);
}

.auth-reassure svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--color-accent);
}

/* The scope of the free plan, stated before the account exists. Quieter than
   the "no card needed" half it follows, but on the same line — it is the same
   sentence, not a disclaimer hiding under one. */
.auth-reassure-limit {
    color: var(--color-text-muted);
}

.auth-trust {
    margin: 12px 0 0;
    padding-top: 12px;
    border-top: 1px solid var(--color-border);
    font-size: 0.75rem;
    line-height: 1.5;
    color: var(--color-text-muted);
}

.auth-sub {
    text-align: center;
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-top: 16px;
}

.auth-sub a {
    color: var(--color-primary);
    font-weight: 500;
}

/* On a phone the whole card has to reach the submit button inside one screen —
   a host who cannot see the button assumes the page is still loading. The
   recap and the step strip are worth ~150px the old bare form did not spend,
   so the rhythm tightens a little here to pay for them.

   The target is a current handset (iPhone 17, 402×734 of visible viewport in
   Safari), not the smallest one on the market. Fitting an iPhone SE as well
   was possible but cost real air — a squeezed heading and roughly half the
   vertical rhythm on every modern phone, to suit a 2022 screen. On a screen
   that short the page now simply scrolls, which is what a form is allowed to
   do; what must not happen is the button sitting under the fold on the phone
   most hosts actually hold. tests/18-register.spec.ts measures it. */
@media (max-width: 480px) {
    .auth-card {
        padding: 30px 20px 32px;
    }

    .auth-main {
        padding: 36px 16px 32px;
    }

    .auth-card h1 {
        font-size: 1.5rem;
        margin-bottom: 18px;
    }

    .auth-card.has-recap h1 {
        margin-bottom: 14px;
    }

    /* Narrow enough that three uppercase words plus connectors can run out of
       room. Wrapping is fine — the strip is a progress read, not a control —
       but it must never push the card sideways. */
    .auth-steps {
        flex-wrap: wrap;
        row-gap: 4px;
        margin-bottom: 18px;
        font-size: 0.6875rem;
    }

    .auth-recap {
        margin-bottom: 20px;
    }

    .auth-recap-name {
        font-size: 1.25rem;
    }

    .auth-card .field {
        margin-bottom: 14px;
    }

    /* The consent banner is a fixed panel pinned to the bottom of the viewport
       (.cookie-consent in main.css) and on a phone it is full-width and ~215px
       tall — enough to sit over the password field and the submit button of a
       first-time visitor, who by definition has not dismissed it yet. Scrolling
       does not help on its own: the panel is fixed, so without somewhere to
       scroll *to* the button never clears it.
       This only buys the clearance. The banner still covers the bottom of the
       screen on every page, which is a site-wide call and not this file's to
       make; :has() keeps the padding off the pages where no banner exists (and
       degrades to today's behaviour on a browser without it). */
    body:has(.cookie-consent) .auth-main {
        padding-bottom: 240px;
    }
}
