:root {
  color-scheme: light;
  --navy: #10243d;
  --navy-soft: #183958;
  --blue: #2568c8;
  --teal: #0d8178;
  --teal-dark: #09675f;
  --text: #18263a;
  --muted: #69788c;
  --line: #d8e1ea;
  --background: #eef3f7;
  --danger: #a52f2f;
  font-family: "Segoe UI", "Malgun Gothic", Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--background);
}

button,
input,
select,
textarea { font: inherit; }

.signup-shell {
  display: grid;
  grid-template-columns: minmax(300px, 0.78fr) minmax(500px, 1.22fr);
  width: min(1120px, calc(100% - 40px));
  min-height: 720px;
  margin: 38px auto;
  overflow: hidden;
  border: 1px solid #d3dde7;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 24px 70px rgb(16 36 61 / 15%);
}

.intro-panel {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  padding: 42px 38px;
  color: #fff;
  background:
    radial-gradient(circle at 85% 10%, rgb(54 167 160 / 28%), transparent 28%),
    linear-gradient(145deg, var(--navy) 0%, #143b5f 58%, #0b6662 135%);
}

.brand {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, #36a7a0, #2a68ca);
  font-size: 22px;
  font-weight: 900;
}

.brand strong,
.brand small { display: block; }
.brand strong { letter-spacing: 0.08em; }
.brand small { margin-top: 3px; color: #aec2d5; font-size: 12px; }

.intro-copy { margin-top: 78px; }
.eyebrow {
  margin: 0 0 8px;
  color: var(--teal);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.12em;
}
.intro-panel .eyebrow { color: #70d6ce; }
.intro-copy h1 {
  margin: 0;
  font-size: clamp(29px, 3vw, 40px);
  line-height: 1.3;
  letter-spacing: -0.04em;
}
.intro-copy > p:last-child {
  margin: 18px 0 0;
  color: #cbd9e7;
  font-size: 14px;
  line-height: 1.75;
}

.signup-steps {
  display: grid;
  gap: 18px;
  margin: 48px 0 0;
  padding: 0;
  list-style: none;
}
.signup-steps li { display: flex; align-items: center; gap: 13px; }
.signup-steps li > span {
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 26%);
  border-radius: 50%;
  color: #8ee2dc;
  background: rgb(255 255 255 / 7%);
  font-size: 12px;
  font-weight: 800;
}
.signup-steps strong,
.signup-steps small { display: block; }
.signup-steps strong { font-size: 13px; }
.signup-steps small { margin-top: 4px; color: #afc2d4; font-size: 12px; }

.security-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: auto 0 0;
  padding-top: 34px;
  color: #c3d3e2;
  font-size: 12px;
  line-height: 1.55;
}
.security-note::before {
  display: grid;
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgb(112 214 206 / 60%);
  border-radius: 50%;
  color: #70d6ce;
  content: "\2713";
  font-size: 11px;
  font-weight: 900;
}

.form-panel { padding: 42px 46px 34px; background: #fff; }
.form-heading h2 { margin: 0 0 9px; font-size: 28px; letter-spacing: -0.03em; }
.form-heading > p:last-child { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }

form { margin-top: 28px; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.role-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.role-picker legend { grid-column: 1 / -1; margin-bottom: 8px; font-size: 13px; font-weight: 750; }
.role-picker legend b,
.field b,
.consent-field b { color: var(--teal); }
.role-picker label { position: relative; cursor: pointer; }
.role-picker input { position: absolute; opacity: 0; pointer-events: none; }
.role-picker label > span {
  display: grid;
  min-height: 72px;
  align-content: center;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}
.role-picker strong,
.role-picker small { display: block; }
.role-picker strong { font-size: 13px; }
.role-picker small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.role-picker input:checked + span {
  border-color: var(--blue);
  background: #f2f7fe;
  box-shadow: 0 0 0 2px rgb(37 104 200 / 11%);
}
.role-picker input:focus-visible + span { outline: 3px solid rgb(37 104 200 / 20%); outline-offset: 2px; }

.role-help {
  margin: 10px 0 0;
  padding: 9px 11px;
  border-left: 3px solid var(--teal);
  color: #516276;
  background: #f3f8f8;
  font-size: 12px;
  line-height: 1.55;
}

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 14px; margin-top: 22px; }
.field { display: block; min-width: 0; }
.field[hidden] { display: none; }
.field > span { display: block; margin-bottom: 7px; font-size: 12px; font-weight: 750; }
.field-wide { grid-column: 1 / -1; }
.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid #c8d3de;
  border-radius: 7px;
  color: var(--text);
  background: #fff;
  outline: none;
}
.field input,
.field select { height: 43px; padding: 0 11px; }
.field textarea { min-height: 84px; padding: 10px 11px; resize: vertical; line-height: 1.5; }
.field input:focus,
.field select:focus,
.field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgb(37 104 200 / 12%); }
.field input::placeholder,
.field textarea::placeholder { color: #99a6b5; }

.trap-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.consent-field {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 18px;
  color: #526175;
  font-size: 12px;
  line-height: 1.55;
  cursor: pointer;
}
.consent-field input { width: 16px; height: 16px; flex: 0 0 auto; margin: 1px 0 0; accent-color: var(--teal); }

.form-error {
  margin: 15px 0 0;
  padding: 10px 12px;
  border-radius: 7px;
  color: var(--danger);
  background: #faecec;
  font-size: 12px;
}

.submit-button {
  display: inline-flex;
  width: 100%;
  min-height: 45px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--teal);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}
.submit-button:hover,
.submit-button:focus-visible { background: var(--teal-dark); outline: 3px solid rgb(13 129 120 / 18%); }
.submit-button:disabled { opacity: 0.65; cursor: wait; }
.login-link { margin: 19px 0 0; color: var(--muted); font-size: 12px; text-align: center; }
.login-link a { color: var(--blue); font-weight: 750; text-decoration: none; }
.login-link a:hover { text-decoration: underline; }

#formView[hidden],
.success-view[hidden] { display: none; }
.success-view { display: grid; min-height: 630px; align-content: center; justify-items: center; text-align: center; }
.success-icon {
  display: grid;
  width: 62px;
  height: 62px;
  margin-bottom: 24px;
  place-items: center;
  border-radius: 50%;
  color: var(--teal);
  background: #e5f4f2;
}
.success-icon { font-size: 29px; font-weight: 900; }
.success-view h2:focus { outline: none; }
.success-view h2 { margin: 0 0 11px; font-size: 27px; }
.success-view > p:not(.eyebrow) { max-width: 440px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.success-view dl {
  width: min(400px, 100%);
  margin: 28px 0 4px;
  border-block: 1px solid var(--line);
}
.success-view dl > div { display: flex; justify-content: space-between; gap: 20px; padding: 14px 4px; border-bottom: 1px solid #edf1f5; }
.success-view dl > div:last-child { border-bottom: 0; }
.success-view dt { color: var(--muted); font-size: 12px; }
.success-view dd { margin: 0; font-size: 13px; font-weight: 800; }
.success-view .submit-button { width: min(400px, 100%); margin-top: 25px; }

@media (max-width: 860px) {
  .signup-shell { grid-template-columns: 1fr; margin: 18px auto; }
  .intro-panel { min-height: auto; padding: 30px; }
  .intro-copy { margin-top: 44px; }
  .signup-steps { grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 34px; }
  .signup-steps li { align-items: flex-start; }
  .signup-steps small { display: none; }
  .security-note { margin-top: 30px; padding-top: 0; }
}

@media (max-width: 620px) {
  .signup-shell { width: calc(100% - 20px); margin: 10px auto; border-radius: 10px; }
  .intro-panel { padding: 24px 20px; }
  .intro-copy { margin-top: 36px; }
  .intro-copy h1 { font-size: 28px; }
  .signup-steps { grid-template-columns: 1fr; }
  .signup-steps small { display: block; }
  .form-panel { padding: 30px 20px; }
  .role-picker,
  .form-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .success-view { min-height: 500px; }
}
