/* Pages of the «accesso» area. Owned by the accesso builder: page rules only, every value through the tokens of tokens.css.
   Class prefix .auth2-; .auth-* belongs to accesso.html and pages.css. */

/* ================================================================ the full-page column (second factor, recovery, activation, errors) */
.auth-help a, .auth2-who a { text-decoration: underline; text-underline-offset: 3px; }
.auth2-who { margin-top: var(--s5); font-size: var(--t-sub); color: var(--label-2); line-height: 1.5; }
.auth2-who strong { color: var(--label); font-weight: var(--w-semibold); }
/* the way back is a quiet move under the primary one, centred on the column */
.auth2-back { display: flex; justify-content: center; margin-top: var(--s4); }
.auth2-back .icon { width: var(--icon-m); height: var(--icon-m); }
/* a recovery code is sixteen characters and three dashes: tighter than a six-digit code, still on one line at 350 px */
.input--code.auth2-recovery { font-size: 16px; letter-spacing: .1em; padding: 0 8px; }
.auth2-recovery::placeholder { letter-spacing: .1em; }

/* ================================================================ activation: a real sequence of three steps */
.auth2-stepper { margin-top: var(--s6); }
.auth2-stepper + .auth-steps h1 { margin-top: var(--s5); }
/* A QR code must be dark on light in both themes or a phone cannot read it: the tile forces a light colour scheme, so the
   system colours Canvas and CanvasText are white and black whatever the page is. No token stands for that pair. */
.auth2-qr { width: 216px; max-width: 100%; margin: var(--s6) auto 0; border-radius: var(--r-md); overflow: hidden; color-scheme: light; background: Canvas; color: CanvasText; box-shadow: inset 0 0 0 var(--hairline) var(--sep-strong); }
.auth2-qr svg { display: block; width: 100%; height: auto; fill: currentColor; }
.auth2-manual { margin-top: var(--s4); text-align: center; }
.auth2-manual .disclosure-body { padding-left: 0; text-align: left; }
.auth2-key { margin-top: var(--s3); flex-direction: column; align-items: stretch; gap: var(--s2); }
/* the key is thirty-two characters: smaller than a code, and allowed to break rather than leave the column */
.auth2-key .code-value { font-size: var(--t-control); letter-spacing: .04em; overflow-wrap: anywhere; }
.auth2-secret { flex-direction: column; align-items: stretch; gap: var(--s4); margin-top: var(--s5); }
.auth2-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px var(--s4); }
.auth2-codes .code-inline { white-space: nowrap; }
.auth2-secret-actions { display: flex; flex-wrap: wrap; gap: var(--s2); }

/* ================================================================ error pages */
/* the code is a figure of speech, not a label: large, quiet, and hidden from a screen reader (the title says it) */
.auth2-numeral { margin-top: var(--s6); font-size: 88px; line-height: 1; font-weight: var(--w-bold); letter-spacing: -.04em; color: var(--label-2); font-variant-numeric: tabular-nums; }
.auth2-numeral + h1 { margin-top: var(--s3); }
.auth2-actions { display: flex; flex-direction: column; align-items: stretch; gap: var(--s2); }
.auth2-actions .btn--plain { align-self: center; }
.auth2-actions .btn--plain .icon { width: var(--icon-m); height: var(--icon-m); }
.auth2-detail { margin-top: var(--s5); }
.auth2-maybe { margin-top: var(--s7); }
.auth2-maybe h2 { margin-bottom: var(--s2); font-size: var(--t-head); font-weight: var(--w-semibold); letter-spacing: -.012em; }

/* ================================================================ password */
.auth2-pw-note { margin-top: var(--s5); }
.auth2-pw-form { max-width: 520px; margin-top: var(--s7); }
.auth2-pw-form.is-invalid { animation: nope .4s var(--ease-out); }
.auth2-strength { margin-top: var(--s2); }
.auth2-strength .form-help { margin-top: 8px; min-height: 2.9em; }
/* the bar moves with the spring that never overshoots; it is empty, amber while a rule fails, accent once they pass, green when long */
.auth2-meter .meter-fill { animation: none; transition: width var(--spring-smooth-d) var(--spring-smooth), opacity var(--fade) var(--ease-out), background-color var(--fade) var(--ease-out); }
.auth2-meter[data-level='0'] .meter-fill { opacity: 0; }
.auth2-rules-box { margin-top: var(--s2); }
.auth2-rules li { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: var(--t-sub); color: var(--label-2); }
.auth2-rules .icon { width: var(--icon-s); height: var(--icon-s); color: var(--label-3); }
.auth2-rules .is-ok { color: var(--label); }
.auth2-rules .is-ok .icon { color: var(--positive); }
.auth2-rules .is-fail, .auth2-rules .is-fail .icon { color: var(--negative); }
.auth2-match { display: flex; align-items: center; gap: 6px; font-size: var(--t-foot); color: var(--positive); }
.auth2-match .icon { width: var(--icon-s); height: var(--icon-s); }
.auth2-done .empty { padding-top: var(--s8); }

/* a temporary password is the only page the person may open: it keeps the page, loses the shell */
.auth2-solo-only { display: none; }
.auth2-solo main { margin-left: 0; }
.auth2-solo .auth2-pw { max-width: 520px; padding-top: var(--s6); }
.auth2-solo .auth-brand.auth2-solo-only { display: flex; margin-bottom: var(--s6); }
.auth2-solo .auth-foot.auth2-solo-only { display: block; }

/* ================================================================ settings */
.auth2-pref .page-head + * { margin-top: var(--s7); }
.auth2-me .form-help { margin-top: 10px; max-width: 60ch; }
.auth2-me + .form-section { margin-top: var(--s8); }
.auth2-pref .form-section-head { margin-bottom: var(--s3); }
.auth2-pref .setting-control { gap: var(--s5); }
.auth2-pref .setting-sub strong { color: var(--label); font-weight: var(--w-semibold); }
.auth2-groups { margin-top: var(--s2); }
.auth2-groups .row-item { cursor: default; }
.auth2-cols + .auth2-cols { margin-top: var(--s6); }
.auth2-cols .headline { margin-bottom: var(--s2); }

@media (max-width: 640px) {
  .auth2-pref .setting-control { flex-wrap: wrap; gap: var(--s4); }
  .auth2-numeral { font-size: 72px; }
}

/* The brand image of the installation is the background of the pages before sign-in (`043/7g`): it fills the window
   and keeps its proportions, and a veil of the page colour keeps the text from ever reading on the picture. */
.auth-page { position: relative; isolation: isolate; }
.auth-image { position: fixed; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.auth-page::before { content: ''; position: fixed; inset: 0; z-index: -1; background: color-mix(in srgb, var(--bg) 94%, transparent); }
.auth2-manual .code-inline { overflow-wrap: anywhere; }

/* The top bar of the mockup holds only its appearance switcher, which the product does not have: left empty it keeps the column
   where the mockup draws it, 56 px under the top of the window (the bar's two paddings and the switcher's height). */
.auth-bar:empty { min-height: 56px; box-sizing: border-box; padding: 0; }
/* «Not you?» is a POST (the logout refuses a GET), so it is a button that reads as the link of the mockup */
.auth2-who { display: block; }
.auth2-link { padding: 0; border: 0; background: none; font: inherit; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
/* the way back to the sign-in is a POST too: a form that is the same centred line as the link of the mockup */
form.auth2-back { margin-top: var(--s4); }
form.auth2-back .btn { background: none; }
.auth2-open { margin-top: var(--s2); }

/* going back to the previous step of the setup moves the same two steps the other way: the one that leaves goes to the
   trailing edge and the one that arrives comes from the leading one (the forward move is `.is-out` and `.is-in-start`
   of pages.css) */
.auth-step.is-out.is-back { transform: translateX(24px); }
.auth-step.is-in-start.is-back { transform: translateX(-24px); }
