:root {
  color-scheme: light;
  --bg: #fffaf6;
  --ink: #0d0d0d;
  --muted: #7b7b82;
  --line: #e5e5ea;
  --panel: #ffffff;
  --accent: #ff5a12;
  --accent-strong: #ef4b00;
  --accent-soft: #fff0eb;
  --danger: #ff3b0a;
  --danger-soft: #fff0ec;
  --success: #b34700;
  --shadow: 0 30px 90px rgba(33, 23, 16, 0.16);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 14% 48%, rgba(255, 90, 18, 0.11), transparent 30rem),
    radial-gradient(circle at 90% 52%, rgba(255, 90, 18, 0.13), transparent 28rem),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  color: var(--ink);
  overflow-x: hidden;
}

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

svg {
  display: block;
}

.topbar {
  height: 88px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #050505;
  backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 max(28px, calc((100vw - 1180px) / 2));
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand img {
  width: 174px;
  height: auto;
}

.topbar p {
  min-width: 0;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.95rem;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.topbar a:not(.brand) {
  color: #ffffff;
  font-weight: 800;
  text-decoration: none;
  margin-left: 6px;
  overflow-wrap: anywhere;
}

.page-shell {
  width: min(980px, calc(100% - 32px));
  min-height: calc(100vh - 88px);
  margin: 0 auto;
  display: grid;
  align-items: center;
  padding: 30px 0 38px;
}

.form-panel {
  min-width: 0;
  border: 1px solid rgba(229, 229, 234, 0.95);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.profile-form {
  display: grid;
  gap: 22px;
  padding: clamp(28px, 5vw, 56px) clamp(24px, 5vw, 72px) 30px;
}

.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: min(760px, 100%);
  margin: 0 auto 12px;
}

.stepper i {
  width: min(56px, 7vw);
  height: 1px;
  flex: 0 1 56px;
  background: #d8d8de;
}

.step {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #8a8a92;
  font-size: 0.86rem;
  font-weight: 800;
  white-space: nowrap;
}

.step strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.step span {
  width: 28px;
  height: 28px;
  border: 1px solid #d8d8de;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #ffffff;
  color: #8a8a92;
  font-size: 0.82rem;
}

.step--active {
  color: var(--accent-strong);
}

.step--active span {
  border-color: transparent;
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 0 0 6px rgba(255, 90, 18, 0.12);
}

.form-heading {
  text-align: center;
  margin-bottom: 6px;
}

h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2.15rem, 5vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: 0;
  font-weight: 900;
}

.form-heading > p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.45;
}

.helper-line,
.privacy-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #8a8a92;
  font-size: 0.94rem;
}

.helper-line {
  margin-top: 10px;
}

.helper-line svg,
.privacy-note svg {
  width: 18px;
  height: 18px;
  color: #a0a0a8;
  stroke: currentColor;
  stroke-width: 1.9;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
}

.form-section {
  display: grid;
  gap: 18px;
  min-width: 0;
  margin: 0;
  border: 0;
  border-top: 1px solid rgba(229, 229, 234, 0.95);
  padding: 24px 0 0;
}

.form-section legend {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-bottom: 18px;
  padding: 0;
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 900;
}

.form-section legend span {
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  padding: 6px 10px;
  font-size: 0.76rem;
  line-height: 1;
  text-transform: uppercase;
}

.field {
  display: grid;
  min-width: 0;
  gap: 8px;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 800;
}

.field > span {
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.input-shell {
  min-height: 56px;
  border: 1px solid #dcdce2;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.78);
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease;
}

.input-shell:focus-within {
  border-color: rgba(255, 90, 18, 0.72);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(255, 90, 18, 0.12);
}

.input-shell svg {
  width: 19px;
  height: 19px;
  color: #222222;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-width: 0;
  min-height: 54px;
  border: 0;
  background: transparent;
  color: var(--ink);
  outline: none;
  padding: 0;
}

.field input::placeholder {
  color: #9a9aa2;
}

.field textarea {
  min-height: 118px;
  border: 1px solid #dcdce2;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.78);
  outline: none;
  padding: 16px;
  resize: vertical;
  line-height: 1.45;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease;
}

.field textarea:focus {
  border-color: rgba(255, 90, 18, 0.72);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(255, 90, 18, 0.12);
}

.field textarea::placeholder {
  color: #9a9aa2;
}

.field input[readonly] {
  color: #8d8d94;
}

.select-shell {
  grid-template-columns: 24px minmax(0, 1fr);
}

.field select {
  appearance: none;
  cursor: pointer;
  font-weight: 700;
  background:
    linear-gradient(45deg, transparent 50%, #1f1f23 50%) calc(100% - 6px) 24px / 6px 6px
      no-repeat,
    linear-gradient(135deg, #1f1f23 50%, transparent 50%) calc(100% - 1px) 24px / 6px 6px
      no-repeat;
  padding-right: 26px;
}

.pill-group,
.card-grid,
.mini-card-grid,
.checkbox-grid {
  display: grid;
  gap: 10px;
}

.pill-group {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.mini-card-grid,
.checkbox-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pill-option,
.choice-card,
.mini-card,
.check-option {
  position: relative;
  display: grid;
  min-width: 0;
  border: 1px solid #dcdce2;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  cursor: pointer;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease,
    transform 160ms ease;
}

.pill-option input,
.choice-card input,
.mini-card input,
.check-option input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.pill-option span,
.choice-card strong,
.mini-card span,
.check-option span {
  min-width: 0;
}

.pill-option {
  min-height: 46px;
  place-items: center;
  border-radius: 999px;
  padding: 10px 14px;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 900;
}

.choice-card {
  min-height: 126px;
  align-content: center;
  justify-items: start;
  gap: 12px;
  border-radius: 12px;
  padding: 18px;
}

.choice-card > span {
  width: 34px;
  height: 30px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 900;
}

.choice-card strong {
  font-size: 0.95rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.mini-card {
  min-height: 58px;
  place-items: center;
  border-radius: 11px;
  padding: 12px;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 900;
}

.check-option {
  min-height: 56px;
  align-items: center;
  border-radius: 11px;
  padding: 12px 14px 12px 42px;
  font-size: 0.88rem;
  font-weight: 800;
}

.check-option::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 16px;
  height: 16px;
  border: 1px solid #c9c9d0;
  border-radius: 5px;
  transform: translateY(-50%);
  background: #ffffff;
}

.check-option:has(input:checked)::after {
  content: "";
  position: absolute;
  left: 19px;
  top: calc(50% - 5px);
  width: 5px;
  height: 10px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.pill-option:has(input:checked),
.choice-card:has(input:checked),
.mini-card:has(input:checked),
.check-option:has(input:checked) {
  border-color: rgba(255, 90, 18, 0.78);
  background: var(--accent-soft);
  box-shadow: 0 0 0 4px rgba(255, 90, 18, 0.1);
}

.check-option:has(input:checked)::before {
  border-color: var(--accent);
  background: var(--accent);
}

.pill-option:hover,
.choice-card:hover,
.mini-card:hover,
.check-option:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 90, 18, 0.52);
}

.toggle-row {
  min-height: 66px;
  border: 1px solid #dcdce2;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
}

.toggle-row strong {
  font-size: 0.94rem;
  line-height: 1.35;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
  cursor: pointer;
  color: var(--ink);
  font-weight: 900;
}

.switch input {
  position: absolute;
  opacity: 0;
}

.switch span {
  width: 48px;
  height: 28px;
  border-radius: 999px;
  background: #d1d1d8;
  position: relative;
  transition: background-color 160ms ease;
}

.switch span::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  transition: transform 160ms ease;
}

.switch input:checked + span {
  background: var(--accent);
}

.switch input:checked + span::after {
  transform: translateX(20px);
}

.switch em {
  font-style: normal;
  font-size: 0.88rem;
}

.conditional-field {
  margin-top: -4px;
}

.submit-button {
  min-height: 58px;
  border: 0;
  border-radius: 11px;
  margin-top: 2px;
  background: linear-gradient(135deg, #ff7a1a 0%, var(--accent) 100%);
  color: #ffffff;
  cursor: pointer;
  font-size: 1.08rem;
  font-weight: 900;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    filter 160ms ease;
}

.submit-button::after {
  content: " ->";
  margin-left: 18px;
  font-weight: 800;
}

.submit-button--busy::after {
  content: "";
  margin-left: 0;
}

.submit-button:hover {
  box-shadow: 0 16px 34px rgba(255, 90, 18, 0.26);
  filter: saturate(1.04);
  transform: translateY(-1px);
}

.submit-button:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
  box-shadow: none;
}

.privacy-note {
  margin: 0;
}

.status,
.form-message {
  display: none;
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 0.94rem;
  line-height: 1.45;
}

.status--visible,
.form-message--visible {
  display: block;
}

.status--info {
  background: var(--accent-soft);
  color: var(--success);
}

.status--error,
.form-message--error {
  background: var(--danger-soft);
  color: var(--danger);
}

.form-message--success {
  background: var(--accent-soft);
  color: var(--success);
}

@media (max-width: 760px) {
  .topbar {
    height: auto;
    padding: 16px 18px;
  }

  .topbar p {
    font-size: 0.86rem;
    line-height: 1.35;
  }

  .page-shell {
    min-height: calc(100vh - 74px);
    width: min(100% - 20px, 620px);
    align-items: start;
    padding: 14px 0 28px;
  }

  .form-panel {
    border-radius: 16px;
    box-shadow: 0 18px 54px rgba(33, 23, 16, 0.14);
  }

  .profile-form {
    gap: 18px;
    padding: 22px 16px 20px;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .stepper {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    margin-bottom: 4px;
  }

  .stepper i {
    display: none;
  }

  .step {
    justify-content: center;
    gap: 0;
    border: 1px solid #e2e2e7;
    border-radius: 10px;
    padding: 8px 4px;
    background: #ffffff;
    font-size: 0.72rem;
    text-align: center;
    white-space: normal;
  }

  .step span {
    width: 24px;
    height: 24px;
    font-size: 0.72rem;
  }

  .step strong {
    display: none;
  }

  .step--active {
    border-color: rgba(255, 90, 18, 0.45);
    background: var(--accent-soft);
  }

  h2 {
    font-size: 2rem;
    line-height: 1.08;
  }

  .form-heading > p {
    margin-top: 10px;
    font-size: 0.95rem;
  }

  .helper-line,
  .privacy-note {
    align-items: flex-start;
    justify-content: flex-start;
    text-align: left;
    line-height: 1.35;
  }

  .form-section {
    gap: 14px;
    padding-top: 18px;
  }

  .form-section legend {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 0.98rem;
    line-height: 1.25;
  }

  .input-shell {
    min-height: 52px;
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 10px;
    padding: 0 12px;
  }

  .input-shell svg {
    width: 18px;
    height: 18px;
  }

  .field input,
  .field select {
    min-height: 50px;
    font-size: 0.95rem;
  }

  .field textarea {
    min-height: 104px;
    padding: 13px;
    font-size: 0.95rem;
  }

  .pill-group,
  .mini-card-grid,
  .checkbox-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .pill-option {
    min-height: 44px;
    padding: 9px 10px;
    font-size: 0.82rem;
    line-height: 1.2;
  }

  .choice-card {
    min-height: 64px;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    align-content: center;
    gap: 12px;
    padding: 12px;
  }

  .choice-card > span {
    width: 34px;
    height: 30px;
  }

  .mini-card,
  .check-option {
    min-height: 50px;
    font-size: 0.82rem;
    line-height: 1.2;
  }

  .check-option {
    padding: 11px 10px 11px 36px;
  }

  .check-option::before {
    left: 12px;
  }

  .check-option:has(input:checked)::after {
    left: 17px;
  }

  .toggle-row {
    align-items: flex-start;
    flex-direction: column;
    min-height: 0;
    gap: 12px;
    padding: 13px;
  }

  .toggle-row strong {
    font-size: 0.88rem;
  }

  .submit-button {
    min-height: 54px;
    font-size: 0.98rem;
  }
}

@media (max-width: 520px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .brand {
    line-height: 1;
  }

  .brand img {
    width: 146px;
  }

  h2 {
    font-size: 1.8rem;
  }

  .form-heading > p,
  .helper-line,
  .privacy-note {
    font-size: 0.9rem;
  }

  .profile-form {
    padding-inline: 14px;
  }
}

@media (max-width: 380px) {
  .page-shell {
    width: min(100% - 14px, 620px);
  }

  .profile-form {
    padding: 18px 12px;
  }

  .pill-group,
  .mini-card-grid,
  .checkbox-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    padding-inline: 14px;
  }

  .topbar p {
    font-size: 0.8rem;
  }

  .form-section legend {
    font-size: 0.94rem;
  }
}
