/* =============================================================================
   CREATE AN ACCOUNT — the registration wizard (templates/register/).

   A page of it is the sign-in card (.auth__*) made wider, holding the design
   system's own pieces: .steps for the numbered progress, .form / .field /
   .field-row / .check / .btn for the steps, .facts / .address / .status for
   the review, .callout and .confirm__* for the page after. What is below is
   only what those do not already say. Tokens only — no color of its own, and
   every corner a radius token, so Corner style › Square reaches it.

     body.auth--register   the wider card
     .reg-steps            the progress indicator's link to a step already done
     .reg-title            a step's and a section's heading
     .reg-section          one group of fields, ruled off from the next
     .reg-row--even        two fields of equal width from 720px
     .reg-inline           a control with a small button beside it
     .reg-ship             the shipping address; hidden while "same as billing"
     .reg-doc              one document block        .reg-req  the red asterisk
     .reg-actions          Back (left) and Continue (right)
     .reg-review / .reg-summary / .reg-doclist      the review page
     .reg-done             the page after submitting
   ========================================================================== */

body.auth--register .auth__card { max-width: 760px; }
body.auth--register-done .auth__card { max-width: 560px; }
/* A form's own text is left-aligned; the card's heading stays centered. */
body.auth--register .auth__card .hint { text-align: left; }

/* ------------------------------------------------------- the progress --- */
.reg-steps { margin: 0 0 1.4rem; }
.reg-steps__link {
  display: flex; flex-direction: inherit; align-items: center; justify-content: center;
  gap: .3rem; min-width: 0; color: inherit; text-decoration: none;
}
.reg-steps__link:hover .steps__label, .reg-steps__link:focus-visible .steps__label { text-decoration: underline; }
/* Four steps across a phone: a little smaller, and a word is never cut in
   two — "Documents" stays one word, the two-word labels take two lines. */
@media (max-width: 719px) {
  .reg-steps { gap: .25rem; }
  .reg-steps .steps__step { font-size: .72rem; padding-left: 0; padding-right: 0; overflow-wrap: normal; }
  /* Back and Continue share the row; a longer pair stacks, each full width. */
  .reg-actions .btn { flex: 1 1 8.5rem; }
}

/* ---------------------------------------------------------- the steps --- */
.reg-title { font-size: 1.15rem; margin: 0; }
.reg-section { display: grid; gap: 1rem; min-width: 0; }
.reg-section + .reg-section, .reg-section + .reg-actions { border-top: 1px solid var(--line); padding-top: 1.25rem; margin-top: .25rem; }
.reg-address { display: grid; gap: 1rem; min-width: 0; }
/* Two fields side by side keep their own height: a hint or a problem under
   one must not stretch the box of the other. */
.auth--register .field-row { align-items: start; }
.reg-inline { display: flex; gap: .5rem; align-items: center; min-width: 0; }
.reg-inline > select, .reg-inline > input { flex: 1 1 auto; min-width: 0; }
.reg-inline > .btn { flex: none; }
.reg-req { color: var(--err); font-weight: 700; }

/* "Shipping address is the same as billing": the fields are hidden, never
   cleared, so unticking shows what was typed. No script is needed for it. */
.reg-ship:has([data-same]:checked) .reg-ship__fields { display: none; }

.reg-actions { display: flex; flex-direction: row-reverse; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.reg-actions .btn { min-width: 8.5rem; }

/* ------------------------------------------------------ the documents --- */
.reg-doc {
  display: grid; gap: .9rem; min-width: 0; padding: 1rem;
  border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--paper);
}
.reg-doc.has-error { border-color: var(--err); }
.reg-doc__name { font-size: 1.02rem; margin: 0; }
.reg-doc__file {
  display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .75rem; margin: 0;
  padding: .55rem .75rem; background: var(--ok-bg); border-radius: var(--radius); min-width: 0;
}
.reg-doc__filename { font-weight: 600; min-width: 0; overflow-wrap: anywhere; flex: 1 1 12rem; }
.reg-doc__size { color: var(--ink-soft); font-size: .9rem; white-space: nowrap; }
.reg-doc input[type="file"] { padding: .5rem .6rem; height: auto; }

/* ---------------------------------------------------------- the review --- */
.reg-review { display: grid; gap: 1rem; min-width: 0; }
.reg-summary { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1rem; min-width: 0; }
.reg-summary__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .6rem; }
.reg-summary__head h3 { margin: 0; font-size: 1.02rem; }
.reg-summary__head a { font-weight: 600; }
.reg-summary .facts { margin: 0; }
.reg-summary__label { font-size: .9rem; font-weight: 600; color: var(--ink-soft); margin: 0 0 .25rem; }
.reg-summary__same { margin: 0; }
.reg-addresses { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); }
.reg-doclist { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.reg-doclist__row { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; min-width: 0; }
.reg-doclist__row + .reg-doclist__row { border-top: 1px solid var(--line); padding-top: .6rem; }
.reg-doclist__what { display: grid; gap: .1rem; min-width: 0; overflow-wrap: anywhere; }
.reg-doclist__what > span { color: var(--ink-soft); font-size: .92rem; }
.reg-doclist__row .status { flex: none; }
.reg-agree { display: grid; gap: .1rem; min-width: 0; }
.reg-agree .check { padding-bottom: .2rem; }

/* ------------------------------------------------- after it is sent in --- */
.reg-done { text-align: center; }
.reg-done .confirm__eyebrow { margin-top: .1rem; }
.reg-done .auth__heading { margin-bottom: .3rem; }
.reg-done__ref { margin: 0 0 .7rem; font-weight: 700; color: var(--ink); }
.reg-done__contact { margin: 0 0 1.1rem; text-align: center; color: var(--ink-soft); font-size: .97rem; }
.reg-done__contact a { white-space: nowrap; }
/* What the account step says about the password it asks for. */
.reg-note { margin: 0; }
.reg-terms { text-align: left; margin-bottom: 1rem; }

@media (min-width: 720px) {
  .reg-row--even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reg-addresses { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reg-doc { padding: 1.1rem 1.25rem; }
}
