:root {
  color-scheme: dark;
  --ink: #ffffff;
  --muted: rgba(255, 255, 255, 0.68);
  --dim: rgba(255, 255, 255, 0.46);
  --line: rgba(255, 255, 255, 0.13);
  --panel: rgba(14, 14, 18, 0.78);
  --field: rgba(255, 255, 255, 0.055);
  --blue: #3f7bff;
  --violet: #9b5cff;
  --pink: #d946ef;
  --shadow: 0 24px 90px rgba(0, 0, 0, 0.48);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "San Francisco", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(145deg, rgba(63, 123, 255, 0.22), transparent 32%),
    linear-gradient(315deg, rgba(217, 70, 239, 0.2), transparent 34%),
    linear-gradient(180deg, #0a0a0a 0%, #101015 52%, #09090b 100%);
}

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

.shell {
  width: min(1200px, calc(100% - 32px));
  min-height: calc(100vh - 48px);
  margin: 24px auto;
  display: grid;
  grid-template-columns: minmax(320px, 0.72fr) minmax(0, 1.28fr);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: rgba(8, 8, 10, 0.8);
  backdrop-filter: blur(22px);
}

.brand-panel {
  position: relative;
  min-height: 720px;
  padding: 34px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: clamp(72px, 14vh, 150px);
  overflow: hidden;
  color: #ffffff;
  background:
    linear-gradient(130deg, rgba(58, 88, 255, 0.2), transparent 34%),
    linear-gradient(310deg, rgba(188, 76, 255, 0.18), transparent 38%),
    linear-gradient(180deg, #0a0a0a, #111116 58%, #08080a);
}

.brand-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.7), transparent 78%);
  pointer-events: none;
}

.topbar,
.hero-copy {
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-link {
  color: #ffffff;
  text-decoration: none;
}

.logo-text {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0;
}

.eyebrow,
.step-kicker {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.52);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 0;
  max-width: 540px;
  font-size: clamp(48px, 6vw, 82px);
  line-height: 0.92;
  letter-spacing: 0;
  color: rgba(255, 255, 255, 0.94);
}

.hero-copy p:last-child {
  max-width: 470px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 18px;
  line-height: 1.6;
}

.portal {
  padding: clamp(24px, 4vw, 54px);
  background:
    linear-gradient(145deg, rgba(63, 123, 255, 0.1), transparent 38%),
    linear-gradient(315deg, rgba(155, 92, 255, 0.12), transparent 38%),
    rgba(12, 12, 15, 0.92);
}

.portal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.portal-header h2 {
  margin: 0;
  font-size: 30px;
  color: #ffffff;
}

.progress-ring {
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--violet) var(--progress, 17%), rgba(255, 255, 255, 0.1) 0);
}

.progress-ring span {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #101015;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
}

.progress-track {
  height: 8px;
  margin: 24px 0 34px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.progress-track div {
  width: 17%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--violet), var(--pink));
  transition: width 220ms ease;
}

.step {
  display: none;
}

.step.active {
  display: grid;
  gap: 18px;
}

.field.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  color: #ffffff;
  outline: none;
  transition: border 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input::placeholder,
textarea::placeholder {
  color: rgba(255, 255, 255, 0.34);
}

input,
select {
  min-height: 52px;
  padding: 0 15px;
}

select {
  appearance: none;
  padding-right: 44px;
  background:
    linear-gradient(45deg, transparent 50%, rgba(255, 255, 255, 0.72) 50%) calc(100% - 23px) 22px / 7px 7px no-repeat,
    linear-gradient(135deg, rgba(255, 255, 255, 0.72) 50%, transparent 50%) calc(100% - 16px) 22px / 7px 7px no-repeat,
    var(--field);
}

select:invalid {
  color: rgba(255, 255, 255, 0.38);
}

.hint {
  color: rgba(255, 255, 255, 0.42);
  font-size: 12px;
  font-weight: 700;
}

textarea {
  min-height: 118px;
  resize: vertical;
  padding: 14px 15px;
  line-height: 1.5;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(155, 92, 255, 0.72);
  box-shadow: 0 0 0 4px rgba(155, 92, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
}

select:focus {
  background:
    linear-gradient(45deg, transparent 50%, rgba(255, 255, 255, 0.9) 50%) calc(100% - 23px) 22px / 7px 7px no-repeat,
    linear-gradient(135deg, rgba(255, 255, 255, 0.9) 50%, transparent 50%) calc(100% - 16px) 22px / 7px 7px no-repeat,
    rgba(255, 255, 255, 0.08);
}

select option {
  background: #111116;
  color: #ffffff;
}

.native-select-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.select-shell {
  position: relative;
}

.select-trigger {
  width: 100%;
  min-height: 52px;
  padding: 0 44px 0 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #ffffff;
  background:
    linear-gradient(45deg, transparent 50%, rgba(255, 255, 255, 0.72) 50%) calc(100% - 23px) 22px / 7px 7px no-repeat,
    linear-gradient(135deg, rgba(255, 255, 255, 0.72) 50%, transparent 50%) calc(100% - 16px) 22px / 7px 7px no-repeat,
    var(--field);
  text-align: left;
  box-shadow: none;
}

.select-trigger.placeholder {
  color: rgba(255, 255, 255, 0.48);
}

.select-trigger[aria-expanded="true"] {
  border-color: rgba(155, 92, 255, 0.72);
  box-shadow: 0 0 0 4px rgba(155, 92, 255, 0.16);
  background:
    linear-gradient(45deg, transparent 50%, rgba(255, 255, 255, 0.9) 50%) calc(100% - 23px) 22px / 7px 7px no-repeat,
    linear-gradient(135deg, rgba(255, 255, 255, 0.9) 50%, transparent 50%) calc(100% - 16px) 22px / 7px 7px no-repeat,
    rgba(255, 255, 255, 0.08);
}

.select-menu {
  position: absolute;
  z-index: 10;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  display: none;
  max-height: 260px;
  overflow: auto;
  padding: 8px;
  border: 1px solid rgba(155, 92, 255, 0.46);
  border-radius: 8px;
  background: #111116;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.44);
}

.select-shell.open .select-menu {
  display: grid;
  gap: 4px;
}

.select-option {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.84);
  background: transparent;
  box-shadow: none;
  justify-content: flex-start;
  text-align: left;
  font-weight: 750;
}

.select-option:hover,
.select-option:focus,
.select-option.selected {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(63, 123, 255, 0.34), rgba(217, 70, 239, 0.32));
}

.actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 34px;
}

button {
  display: inline-flex;
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-weight: 850;
}

.ghost {
  color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.09);
}

.ghost:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--violet), var(--pink));
  box-shadow: 0 12px 28px rgba(123, 92, 255, 0.28);
}

.submit {
  display: none;
}

.result {
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.success-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--violet));
  font-size: 26px;
  font-weight: 900;
}

.result h2 {
  margin: 18px 0 8px;
  color: #ffffff;
}

.result p {
  color: var(--muted);
}

.generated {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.generated h3 {
  margin: 10px 0 0;
}

pre {
  max-height: 260px;
  overflow: auto;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  color: rgba(255, 255, 255, 0.82);
  white-space: pre-wrap;
  line-height: 1.48;
}

@media (max-width: 900px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .brand-panel {
    min-height: 520px;
  }
}

@media (max-width: 620px) {
  .shell {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    border: 0;
    border-radius: 0;
  }

  .brand-panel,
  .portal {
    padding: 24px;
  }

  .brand-panel {
    min-height: 480px;
  }

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

  .portal-header h2 {
    font-size: 24px;
  }

  .actions {
    position: sticky;
    bottom: 0;
    padding-top: 14px;
    background: linear-gradient(transparent, #0c0c0f 28%);
  }

  button {
    flex: 1;
  }
}
