/* The signup pages: /signup/ (two steps in one document) and /signup/code/.
   Follows idea A, "one centred column", on the signup ideas page (design/signup/build.py): no card, a 640px column
   on the white page, the label inside each field. Loads after tokens.css and site.css; every colour, size and space is a token. */

[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

.signup-page { --signup-w: 640px; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--pp-surface); }
.signup-signin { font-family: var(--pp-font-display); font-weight: 600; font-size: 15px; color: var(--pp-text-1); white-space: nowrap; }
.signup-signin:hover { color: var(--pp-teal-deep); }

.signup-main { flex: 1; display: flex; justify-content: center; align-items: flex-start; padding: var(--pp-s8) var(--pp-gutter); }
.signup-col { width: 100%; max-width: var(--signup-w); }
.signup-step { display: flex; flex-direction: column; gap: var(--pp-s5); }
.signup-intro { display: flex; flex-direction: column; gap: var(--pp-s3); }
.signup-step h1 { font-size: 44px; line-height: 1.1; font-weight: 600; letter-spacing: -0.02em; }
.signup-step h1:focus, .signup-step h1:focus-visible { outline: none; box-shadow: none; }   /* focused by script when a step opens, for screen readers; no ring */
.signup-lede { font-size: var(--pp-body-lg); line-height: 1.5; color: var(--pp-text-3); }
.signup-lede b { color: var(--pp-text-1); font-weight: 500; overflow-wrap: anywhere; }
.signup-fields { display: flex; flex-direction: column; gap: var(--pp-s4); }
.signup-foot { font-size: var(--pp-small); color: var(--pp-text-3); }
.signup-foot a { margin-left: var(--pp-s3); }
.signup-foot-group { display: flex; flex-direction: column; gap: 6px; }
.signup-foot-group .signup-foot a { margin-left: 0; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { background: var(--pp-sunken); color: var(--pp-text-4); cursor: default; filter: none; transform: none; }
.link-button { background: none; border: 0; padding: 0; color: var(--pp-teal-deep); cursor: pointer; font: inherit; font-weight: 500; }
.link-button:hover { color: var(--pp-teal-hover); }
.link-button[disabled] { color: var(--pp-text-4); cursor: default; }

/* Fields: the label sits inside the box, small, above what is typed. The error goes under the box in red. */
.field { display: flex; flex-direction: column; gap: var(--pp-s2); min-width: 0; }
.f { position: relative; display: flex; }
.f > label { position: absolute; left: 17.5px; top: 9px; font-size: var(--pp-micro); font-weight: 500; line-height: 1.35; color: var(--pp-text-3); pointer-events: none; }
.f > input, .f > select { width: 100%; height: var(--pp-field-h); border: 1.5px solid var(--pp-line-field); border-radius: var(--pp-r-md); background: var(--pp-surface); padding: 24px 16px 6px; font: inherit; font-size: var(--pp-body); line-height: 1.5; color: var(--pp-text-1); appearance: none; transition: border-color var(--pp-fast) var(--pp-ease), box-shadow var(--pp-fast) var(--pp-ease); }
.f > input:focus, .f > input:focus-visible, .f > select:focus, .f > select:focus-visible { outline: none; border-color: var(--pp-teal); box-shadow: 0 0 0 3px var(--pp-teal-tint); border-radius: var(--pp-r-md); }
.f > input[aria-invalid="true"], .f > select[aria-invalid="true"] { border-color: var(--pp-danger); }
.f-action > input { padding-right: 76px; }
.input-action { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; height: 44px; padding: 0 10px; font-size: 13px; font-weight: 600; color: var(--pp-teal-deep); cursor: pointer; border-radius: var(--pp-r-sm); }
.input-action:hover { color: var(--pp-teal-hover); }
.f-select > select { padding-right: 48px; cursor: pointer; text-overflow: ellipsis; }
.f-select > select:invalid, .f-select > select:disabled { color: var(--pp-text-4); }
.f-select > select:disabled { background: var(--pp-sunken); cursor: default; opacity: 1; }
.f-chev { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--pp-text-2); pointer-events: none; }
.field-error { font-size: 13px; color: var(--pp-danger-text); }
.field-error a, .field-error .link-button { font-weight: 600; text-decoration: underline; }

/* The password rule: an empty circle until it is met, then a filled one with a tick */
.rule { display: flex; align-items: center; gap: var(--pp-s2); font-size: var(--pp-small); color: var(--pp-text-2); }
.rule i { width: 18px; height: 18px; border-radius: 50%; flex: none; display: grid; place-items: center; border: 1.5px solid var(--pp-line-field); color: transparent; transition: background var(--pp-fast) var(--pp-ease), border-color var(--pp-fast) var(--pp-ease); }
.rule.is-met { color: var(--pp-text-1); }
.rule.is-met i { background: var(--pp-success); border-color: var(--pp-success); color: var(--pp-white); }

/* A message about the whole form: the server is down, too many attempts, the bot check */
.form-notice { font-size: var(--pp-small); color: var(--pp-danger-text); background: var(--pp-danger-soft); border-radius: var(--pp-r-md); padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.form-notice.ok { color: var(--pp-text-1); background: var(--pp-teal-soft); }
.form-notice a { color: inherit; font-weight: 600; text-decoration: underline; }
.form-notice .ref { font-family: var(--pp-font-mono); font-size: 13px; }

/* The one tick box: the real checkbox sits over a drawn 22px box, so the keyboard and screen readers still have it */
.ticks-field { display: flex; flex-direction: column; gap: var(--pp-s2); }
.tick { position: relative; display: flex; gap: var(--pp-s3); align-items: flex-start; font-size: 15px; line-height: 1.45; color: var(--pp-text-2); cursor: pointer; }
.tick input { position: absolute; left: 0; top: 0; width: 22px; height: 22px; margin: 0; opacity: 0; cursor: pointer; }
.tick-box { width: 22px; height: 22px; flex: none; margin-top: 1px; border-radius: 3px; border: 1.5px solid var(--pp-line-field); background: var(--pp-surface); display: grid; place-items: center; color: transparent; transition: background var(--pp-fast) var(--pp-ease), border-color var(--pp-fast) var(--pp-ease); }
.tick input:checked + .tick-box { background: var(--pp-ink); border-color: var(--pp-ink); color: var(--pp-white); }
.tick input:focus-visible + .tick-box { box-shadow: var(--pp-focus); }
.tick input[aria-invalid="true"] + .tick-box { border-color: var(--pp-danger); }

/* The six boxes of the code page, with one real input laid over them */
.digits { position: relative; }
.digits input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; background: transparent; color: transparent; caret-color: transparent; font-size: 16px; outline: none; box-shadow: none; }
.digit-cells { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--pp-s3); }
.digit-cells span { height: 72px; border-radius: var(--pp-r-md); border: 1.5px solid var(--pp-line-field); background: var(--pp-surface); display: grid; place-items: center; font-family: var(--pp-font-display); font-weight: 600; font-size: 30px; color: var(--pp-text-1); font-variant-numeric: tabular-nums; }
.digits input:focus + .digit-cells span.is-next { border-color: var(--pp-teal); box-shadow: 0 0 0 3px var(--pp-teal-tint); }
.digits input[aria-invalid="true"] + .digit-cells span { border-color: var(--pp-danger); }

/* The honeypot is off the page for people and still in the form for bots */
.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.bot-check:empty { display: none; }
.bot-check { margin-top: var(--pp-s4); }

.signup-footer { border-top: 1px solid var(--pp-line); padding-block: 18px; font-size: 13px; color: var(--pp-text-3); }
.signup-footer .wrap { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; }
.signup-footer a { color: var(--pp-text-3); }
.signup-footer a:hover { color: var(--pp-text-1); }

@media (max-width: 480px) {
  .signup-page .nav-inner { height: 60px; }
  .signup-page .brand img { height: 26px; }
  .signup-main { padding-top: 28px; padding-bottom: var(--pp-s6); }
  .signup-step { gap: 18px; }
  .signup-step h1 { font-size: 30px; line-height: 1.15; }
  .signup-lede { font-size: var(--pp-body); }
  .signup-fields { gap: 14px; }
  .signup-step .btn-lg { height: 52px; font-size: 17px; }
  .digit-cells { gap: var(--pp-s2); }
  .digit-cells span { height: 56px; font-size: 24px; }
  .signup-footer { font-size: var(--pp-micro); padding-block: 14px; }
  .signup-footer .wrap { gap: 2px 14px; }
}
