/* =====================================================================================================
   SIGN-UP DOORS (Bryan, Oct 30: "make it obvious that when you choose game dev you can post hiring
   roles", "it also feels old and not intuitive"; he picked option A of the mockups,
   https://claude.ai/artifact/BshnA3mC13oLiziUq7nhwJ). Step 1 asks "What brings you here?" with two
   flat sheets: Hiring (the oak band, one tap) and Find work (opens step 5, the craft list). Craft
   icons are the pixel squares from the job board; buttons are the square Guild ones.
   Markup: cloud.js joinDoors and joinCrafts.
   ===================================================================================================== */
#account-form .signup-steps {
  --join-face: #fffefa;
  --join-edge: #1d1d1b;
  --join-band: #6b4a2e;
  --join-band-ink: #f7ecd9;
  --join-work: #2f4a6b;
  --join-line: #c9cbc1;
  --join-muted: #5a5f58;
  --join-on: #f3d27c;
  --join-on-edge: #9a5a17;
  --join-error: #b42318;
}
:root[data-theme='dark'] #account-form .signup-steps {
  --join-face: #242623;
  --join-edge: #050505;
  --join-band: #3a2818;
  --join-band-ink: #f3e3c6;
  --join-work: #1f3049;
  --join-line: #4a4e48;
  --join-muted: #c3c6bd;
  --join-on: #3a2f16;
  --join-on-edge: #e8b44a;
  --join-error: #f4a29a;
}
.account-form:has(.join-doors) {
  max-width: 720px;
}

/* Step 5 (the craft list) shows like the other steps. */
#account-form[data-step='5'] > :not(.signup-steps) {
  display: none;
}
#account-form[data-step='5'] [data-step-panel='5'] {
  display: block;
  animation: signup-step-in 0.32s ease both;
}
@media (prefers-reduced-motion: reduce) {
  #account-form[data-step='5'] [data-step-panel='5'] {
    animation: none;
  }
}
.signup-progress:empty {
  display: none;
}
#account-form :is([data-step-panel='1'], [data-step-panel='5']) h3 {
  margin: 0 0 14px;
  font: 800 26px/1.15 'Bricolage Grotesque', 'DM Sans', sans-serif;
  letter-spacing: -0.02em;
}

/* The craft squares, outlined in ink. */
#account-form .signup-steps .bounty-sig {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 3px;
  background: var(--gx-c, var(--join-on));
  box-shadow: 0 0 0 1.5px var(--join-edge);
  color: var(--gx-on-colour, #1a1420);
}
#account-form .signup-steps .join-sig-studio {
  --gx-c: #e8b44a;
}

/* The two doors. */
.join-doors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 0;
  padding: 0 4px 4px 0;
  border: 0;
}
#account-form .join-door {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 2px solid var(--join-edge);
  border-radius: 10px;
  background: var(--join-face);
  box-shadow: 4px 4px 0 var(--join-edge);
  color: inherit;
  font: inherit;
  text-align: left;
  overflow: hidden;
  cursor: pointer;
}
.join-door input,
.join-craft input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
  #account-form .join-door:hover {
    box-shadow: 6px 6px 0 var(--join-edge);
  }
}
#account-form .join-door:is(:focus-visible, :has(input:focus-visible)) {
  outline: 3px solid var(--join-on-edge);
  outline-offset: 3px;
}
/* The picked door, when they come back to step 1. */
#account-form .join-hire:has(input:checked),
#account-form:has(.join-crafts input:checked) .join-work {
  border-color: var(--join-on-edge);
  box-shadow: 4px 4px 0 var(--join-on-edge);
}
.join-band {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-bottom: 2px solid var(--join-edge);
  background: var(--join-band);
  color: var(--join-band-ink);
  font: 400 14px/1 'Silkscreen', ui-monospace, monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.join-work .join-band {
  background: var(--join-work);
}
.join-band svg {
  flex: none;
  width: 20px;
  height: 20px;
}
.join-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 20px 20px;
}
.join-title {
  font: 800 22px/1.15 'Bricolage Grotesque', 'DM Sans', sans-serif;
  letter-spacing: -0.015em;
}
.join-lede {
  color: var(--join-muted);
  font-size: 15px;
  line-height: 1.45;
}
.join-sigs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.join-body .gx-btn {
  margin-top: auto;
  pointer-events: none;
}
.join-note {
  margin: 14px 0 0;
  color: var(--join-muted);
  font-size: 14px;
}
#account-form .join-doors.needs-pick .join-door {
  border-color: var(--join-error);
}

/* Step 5: back, the question, the crafts. */
.join-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 14px;
  padding: 7px 11px;
  border: 1.5px solid var(--join-line);
  border-radius: 6px;
  background: none;
  color: var(--join-muted);
  font: 650 13px/1 'DM Sans', sans-serif;
  cursor: pointer;
}
.join-crafts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 6px;
  padding: 0 3px 3px 0;
  border: 0;
}
#account-form .join-craft {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 8px 12px 8px 8px;
  border: 1.5px solid var(--join-line);
  border-radius: 8px;
  background: var(--join-face);
  cursor: pointer;
}
#account-form .join-craft .bounty-sig {
  width: 34px;
  height: 34px;
  border-radius: 4px;
}
.join-craft-txt {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.join-craft strong {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}
.join-craft small {
  color: var(--join-muted);
  font-size: 12px;
  line-height: 1.25;
}
@media (hover: hover) and (pointer: fine) {
  #account-form .join-craft:hover {
    border-color: var(--join-edge);
  }
}
#account-form .join-craft:has(input:focus-visible) {
  outline: 3px solid var(--join-on-edge);
  outline-offset: 2px;
}
.join-tick {
  position: absolute;
  top: 6px;
  right: 6px;
  display: none;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: var(--join-on-edge);
  color: var(--join-face);
}
#account-form .join-craft:has(input:checked) {
  border: 2px solid var(--join-on-edge);
  background: var(--join-on);
  box-shadow: 3px 3px 0 var(--join-edge);
}
#account-form .join-craft:has(input:checked) .join-tick {
  display: grid;
}
.join-crafts:not(:has(input:checked)) + .signup-main-next {
  display: none;
}

/* The optional "Other work" chips carry the same squares. */
#account-form .signup-also .craft-chip {
  align-items: center;
  gap: 8px;
}
#account-form .signup-also .craft-chip .bounty-sig {
  width: 20px;
  height: 20px;
}

@media (max-width: 760px) {
  #account-form :is([data-step-panel='1'], [data-step-panel='5']) h3 {
    font-size: 22px;
  }
  .join-doors {
    grid-template-columns: 1fr;
  }
  .join-crafts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  #account-form .join-craft {
    min-height: 52px;
    gap: 10px;
    padding: 6px 8px 6px 6px;
  }
  #account-form .join-craft .bounty-sig {
    width: 28px;
    height: 28px;
  }
  .join-craft small {
    display: none;
  }
  .join-craft strong {
    font-size: 13px;
  }
}

/* Step 4's picked line (Bryan, Oct 30: the Change button "needs to be bigger and obvious"): the pick in
   a flat sheet with a real Guild button to change it. */
#account-form[data-step='4'] .signup-picked {
  gap: 10px 14px;
  padding: 12px 14px;
  border: 2px solid var(--join-edge);
  border-radius: 10px;
  background: var(--join-face);
  box-shadow: 3px 3px 0 var(--join-edge);
}
#account-form .signup-picked #signup-role-summary {
  font: 800 18px/1.2 'Bricolage Grotesque', 'DM Sans', sans-serif;
}
#account-form .signup-picked .join-change {
  min-height: 40px;
  padding: 8px 14px;
  font-size: 14px;
}
#account-form .signup-picked .text-button {
  flex-basis: 100%;
  justify-self: start;
  text-align: left;
}
