:root {
  --bg: #000;
  --panel: #0e0e0f;
  --line: #2a2a2d;
  --line-hi: #8e8e93;
  --text: #f4f4f5;
  --muted: #9a9aa0;
  --silver: linear-gradient(180deg, #fff 0%, #a9a9ae 100%);
  --err: #ff7a7a;
  --r: 12px;
}

* {
  box-sizing: border-box
}

html {
  color-scheme: dark
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Montserrat', system-ui, sans-serif;
  line-height: 1.5
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(300px, 5fr) 7fr;
  max-width: 1200px;
  margin: 0 auto
}

.brand {
  padding: 56px 48px;
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center
}

.logo {
  width: min(300px, 100%);
  height: auto;
  margin: 0 0 32px -24px
}

.brand h1 {
  font-size: clamp(1.9rem, 3.2vw, 2.6rem);
  line-height: 1.12;
  font-weight: 800;
  margin: 0 0 16px;
  letter-spacing: -.02em;
  background: var(--silver);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent
}

.brand p {
  color: var(--muted);
  max-width: 38ch;
  margin: 0
}

.panel {
  padding: 56px 48px 64px
}

h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 28px
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: .82rem;
  font-weight: 600;
  color: #d4d4d8
}

.field.full {
  grid-column: 1/-1
}

.opt {
  font-weight: 400;
  color: var(--muted);
  margin-left: 6px
}

input,
select {
  width: 100%;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 13px 14px;
  font: 500 .95rem 'Montserrat', sans-serif;
  transition: border-color .15s, box-shadow .15s
}

input::placeholder {
  color: #5d5d63
}

input:hover,
select:hover {
  border-color: #44444a
}

input:focus,
select:focus {
  outline: none;
  border-color: #e4e4e7;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .12)
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%239a9aa0' stroke-width='2'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px
}

select:invalid {
  color: #6d6d73
}

option,
optgroup {
  background: #151517;
  color: var(--text)
}

.invalid {
  border-color: var(--err) !important
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0
}

button {
  margin-top: 28px;
  width: 100%;
  border: 0;
  border-radius: var(--r);
  padding: 15px;
  font: 700 1rem 'Montserrat', sans-serif;
  color: #0a0a0a;
  background: var(--silver);
  cursor: pointer;
  transition: transform .12s, opacity .15s
}

button:hover {
  opacity: .92
}

button:active {
  transform: scale(.99)
}

button:focus-visible {
  outline: 3px solid rgba(255, 255, 255, .5);
  outline-offset: 3px
}

button:disabled {
  opacity: .5;
  cursor: wait
}

.error {
  color: var(--err);
  margin: 20px 0 0;
  font-size: .9rem
}

.done {
  text-align: center;
  padding: 80px 0
}

.tick {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin: 0 auto 20px;
  display: grid;
  place-items: center;
  font-size: 1.8rem;
  color: #0a0a0a;
  background: var(--silver);
  animation: pop .45s cubic-bezier(.2, 1.4, .4, 1)
}

.done p {
  color: var(--muted)
}

@keyframes pop {
  from {
    transform: scale(.4);
    opacity: 0
  }

  to {
    transform: scale(1);
    opacity: 1
  }
}

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

  .brand {
    position: static;
    height: auto;
    padding: 36px 24px 8px
  }

  .logo {
    width: 220px;
    margin: 0 0 8px -16px
  }

  .panel {
    padding: 24px 24px 48px
  }

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

@media (prefers-reduced-motion:reduce) {
  * {
    animation: none !important;
    transition: none !important
  }
}

/* Applied position: custom dropdown with a scrolling list */
.dd {
  position: relative
}

.dd-btn {
  width: 100%;
  margin: 0;
  text-align: left;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 13px 38px 13px 14px;
  font: 500 .95rem 'Montserrat', sans-serif;
  cursor: pointer;
  position: relative;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%239a9aa0' stroke-width='2'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  transition: border-color .15s, box-shadow .15s
}

.dd-btn:hover {
  border-color: #44444a;
  opacity: 1
}

.dd-btn:focus-visible,
.dd-btn[aria-expanded="true"] {
  outline: none;
  border-color: #e4e4e7;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .12)
}

.dd-btn.placeholder {
  color: #6d6d73
}

.dd-list {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  margin: 0;
  padding: 6px;
  list-style: none;
  max-height: 280px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #151517;
  border: 1px solid var(--line-hi);
  border-radius: var(--r);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .7);
  scrollbar-width: thin;
  scrollbar-color: #6b6b72 transparent
}

.dd-list::-webkit-scrollbar {
  width: 8px
}

.dd-list::-webkit-scrollbar-thumb {
  background: #5a5a61;
  border-radius: 8px
}

.dd-list::-webkit-scrollbar-thumb:hover {
  background: #8e8e93
}

.dd-group {
  position: sticky;
  top: -6px;
  z-index: 1;
  margin: 0 -6px;
  padding: 10px 16px 6px;
  background: #151517;
  font-size: .72rem;
  font-weight: 700;
  color: var(--muted)
}

.dd-opt {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: .92rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--text)
}

.dd-opt.active {
  background: #262629
}

.dd-opt[aria-selected="true"] {
  background: var(--silver);
  color: #0a0a0a;
  font-weight: 700
}

[hidden] {
  display: none !important
}