/* Sign-up and sign-in (plan 21, U7): one centred card on both pages. Tokens from theme.css only. */
main.page.auth { max-width: 560px; margin-top: 32px; }
.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); overflow: hidden; }
.auth-card + .auth-card { margin-top: 20px; }
.auth-body { padding: 26px 28px 24px; }
@media (max-width: 560px) { .auth-body { padding: 22px 18px 20px; } }

/* The one ribbon (S6): what this page is, with one link. */
.auth-ribbon { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px 10px; margin: 0; padding: 10px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); color: var(--ink-2); font: 600 13.5px/1.35 var(--font); text-align: center; }
.auth-ribbon a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.auth-ribbon .ink { width: 18px; height: 18px; color: var(--ink); flex: none; }   /* a drawing from the ink-tile set (IV44, IV53 stage 4) */

/* Three parts on sign-up: email, account, plan and keys. */
.auth-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 0 0 18px; padding: 0; list-style: none; }
.auth-steps li { height: 4px; border-radius: var(--radius-pill); background: var(--line); font-size: 0; }
.auth-steps li.done, .auth-steps li[aria-current="step"] { background: var(--ink); }
.auth-steps li { transition: background-color .3s ease; }

.auth h1 { font-size: 28px; margin: 6px 0 0; }
.auth .lead { margin: 8px 0 0; color: var(--ink-2); font-size: 15.5px; }
.auth .eyebrow { display: inline-block; }
.auth form { margin-top: 18px; }
.auth label { margin-top: 12px; }
.auth form > label:first-child { margin-top: 0; }
.auth .go { width: 100%; margin-top: 18px; border-radius: var(--radius-pill); }
.auth .alt { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; margin: 16px 0 0; font-size: 14.5px; }
.auth .msg { min-height: 1.4em; margin: 8px 0 0; }
.auth .checked { margin: 16px 0 0; color: var(--muted); font-size: 13.5px; text-align: center; }
.auth .checked a { color: var(--muted); }

/* The hosted sign-up check, inside the card. */
.auth-flow { margin: 16px -8px 0; min-height: 420px; border-radius: var(--radius); overflow: hidden; }
.auth-flow iframe { min-height: 420px; }
.auth-flow[aria-busy="true"] { background: var(--bg-soft); }

/* The receipt (U9): one row per step of the real session. */
.receipt { margin: 18px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.receipt li { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.receipt .icon { width: 20px; height: 20px; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.receipt .pass .icon { stroke: var(--ok); }
.receipt .review .icon, .receipt .unavailable .icon, .receipt .skipped .icon { stroke: var(--warn); }
.receipt .fail .icon { stroke: var(--bad); }
.receipt .product { color: var(--muted); font-size: 13.5px; }
.receipt-foot { display: flex; justify-content: space-between; gap: 12px; margin: 12px 0 0; color: var(--ink-2); font-size: 14.5px; }
.auth .pair { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.auth .pair > * { flex: 1 1 160px; border-radius: var(--radius-pill); justify-content: center; }

/* Sign-in: the device the check saw, and the code. */
.auth .known { margin: 8px 0 0; color: var(--ok); font-size: 14px; }
.auth .device-row { display: grid; grid-template-columns: 22px 1fr; gap: 4px 10px; align-items: center; margin: 16px 0 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-soft); }
.auth .device-row .ink { width: 20px; height: 20px; color: var(--ink); grid-row: span 2; }
.auth .device-row b { font-weight: 620; }
.auth .device-row span { color: var(--muted); font-size: 13.5px; }
.auth .code { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 16px; }
.auth .code input { padding: 12px 0; text-align: center; font: 600 20px/1 var(--mono); }
.auth .tick { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-weight: 500; }
.auth .tick input { width: 18px; height: 18px; margin: 0; accent-color: var(--ink); }

@media (prefers-reduced-motion: reduce) { .auth-steps li { transition: none; } }

/* Sign-up's password field (signup fix plan, 2.3): a show/hide button inside the field, the rule under it, and the server's reason under that. */
.auth .pw { position: relative; }
.auth .pw input { padding-right: 72px; }
.auth .pw-toggle { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); min-height: 32px; padding: 4px 12px; border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--ink); font: 600 14px/1 var(--font); cursor: pointer; }
.auth .pw-toggle:hover { background: var(--surface-2); }
.auth .pw-toggle:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.auth .hint { margin: 6px 0 0; }
.auth #password-err { margin: 6px 0 0; }
.auth form .agree { margin: 18px 0 0; }
.auth form .agree + .go { margin-top: 10px; }
.auth #oauth .agree { margin: 12px 0 0; text-align: center; }
.auth .hint, .auth .agree, .auth #password-err { font-size: 13.5px; line-height: 1.45; }
