:root {
  --ink: #0A0B0D;
  --muted: #5B616E;
  --faint: #8A9099;
  --line: #E9EBEF;
  --blue: #1B1BFF;
  --blue-hover: #1515E8;
  --blue-soft: rgba(27, 27, 255, 0.12);
  --lilac: #C9CCFF;
  --green: #B6F09C;
  --bg: #ffffff;
  --sans: 'DM Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --err: #c62828;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  line-height: 1.55;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-dots {
  display: grid;
  grid-template-columns: repeat(3, 5px);
  grid-template-rows: repeat(3, 5px);
  gap: 1.5px;
}
.brand-dots i { display: block; background: var(--lilac); }
.brand-dots i:nth-child(1),
.brand-dots i:nth-child(3),
.brand-dots i:nth-child(7),
.brand-dots i:nth-child(9) { background: var(--blue); }
.brand-dots i:nth-child(5) { background: var(--green); }
.nav-links { display: flex; gap: 20px; font-size: 14px; }
.nav-links a { color: var(--muted); font-weight: 500; }
.nav-links a:hover { color: var(--ink); text-decoration: none; }

.wrap { max-width: 720px; margin: 0 auto; padding: 40px 24px 80px; }
.wrap-narrow { max-width: 640px; padding-top: 48px; }
h1 {
  font-size: clamp(1.85rem, 4vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin: 0 0 12px;
}
h2 { font-size: 1.35rem; letter-spacing: -0.03em; margin: 0 0 12px; }
.lede { font-size: 17px; color: var(--muted); margin: 0 0 24px; }
.badge-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.badge {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--faint);
}

.progress {
  height: 4px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 8px;
}
.progress-bar {
  height: 100%;
  width: 25%;
  background: var(--blue);
  border-radius: 999px;
  transition: width 0.25s ease;
}
.step-label {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--faint);
  margin: 0 0 20px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  background: #fff;
}
.form-panel fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }

.field { margin-bottom: 20px; }
.field-row { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 4px; }
.field-row .field { flex: 1 1 160px; }
.flex-grow { flex: 2 1 220px; }
label, .label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--ink);
}
.req { color: var(--blue); }
.opt { color: var(--faint); font-weight: 400; }
.hint { display: block; font-size: 12px; color: var(--faint); margin-top: 6px; }

.field-control {
  display: block;
  width: 100%;
  font: inherit;
  font-size: 15px;
  line-height: 1.4;
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid #d5d9e0;
  border-radius: 12px;
  background: #f8f9fb;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  -webkit-appearance: none;
  appearance: none;
}
.field-control::placeholder { color: #9aa3b2; }
.field-control:hover { border-color: #bcc3cf; background: #fff; }
.field-control:focus {
  outline: none;
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 3px var(--blue-soft);
}
.field-control.invalid { border-color: var(--err); background: #fffafa; }
.field-control-mono { font-family: var(--mono); font-size: 14px; }
.field-control-area {
  min-height: 112px;
  resize: vertical;
  line-height: 1.55;
}
select.field-control {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235B616E' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  cursor: pointer;
  user-select: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip:has(input:checked) {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.chip-group.invalid { outline: 2px solid rgba(198, 40, 40, 0.35); outline-offset: 4px; border-radius: 12px; padding: 4px; }

.checks { display: flex; flex-direction: column; gap: 10px; }
.check-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
  cursor: pointer;
}
.check-line input { margin-top: 3px; flex-shrink: 0; accent-color: var(--blue); }

.form-error {
  color: var(--err);
  font-size: 14px;
  margin: 0 0 12px;
}
.form-nav { margin-top: 8px; justify-content: flex-end; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.btn {
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 11px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.btn:active { transform: scale(0.98); }
.btn.primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 6px 20px rgba(27, 27, 255, 0.25);
}
.btn.primary:hover { background: var(--blue-hover); }
.btn.ghost {
  background: #fff;
  border-color: var(--line);
  color: var(--muted);
}
.btn.ghost:hover { color: var(--ink); border-color: var(--ink); }

.success-panel code {
  font-family: var(--mono);
  font-size: 13px;
  background: var(--line);
  padding: 2px 8px;
  border-radius: 6px;
}
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }

@media (max-width: 520px) {
  .wrap { padding: 28px 16px 64px; }
  .form-panel { padding: 18px; }
}
