:root {
  --bg: #f6f7f9;
  --card: #fff;
  --ink: #141414;
  --mute: #6b6f76;
  --line: #e1e4e9;
  --teal: #12a594;
  --teal-soft: rgba(18, 165, 148, 0.18);
  --danger: #c6362c;
  --radius: 12px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 520px;
  margin: 0 auto;
  padding: 28px 16px 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.08em;
}

.brand img { border-radius: 10px; display: block; }

.intro h1 {
  margin: 28px 0 10px;
  font-size: clamp(28px, 7vw, 36px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 800;
}

.intro p { margin: 0 0 24px; color: var(--mute); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 18px;
  box-shadow: 0 1px 2px rgba(20, 20, 20, 0.04), 0 12px 32px rgba(20, 20, 20, 0.05);
}

fieldset { border: 0; margin: 0 0 22px; padding: 0; min-width: 0; }

legend {
  padding: 0;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
}

.field { margin-bottom: 14px; min-width: 0; }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; }

.optional { font-weight: 400; color: var(--mute); }

input[type="text"],
input[type="email"],
select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font: inherit;
  /* 16px keeps iOS Safari from zooming the page when a field is tapped. */
  font-size: 16px;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

select {
  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 d='M1 1l5 5 5-5' fill='none' stroke='%236b6f76' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 4px var(--teal-soft);
}

input[aria-invalid="true"],
select[aria-invalid="true"] { border-color: var(--danger); }

.handle-row { position: relative; margin-bottom: 8px; }

.handle-row .at {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--mute);
  font-weight: 600;
  pointer-events: none;
}

.handle-row input { padding-left: 32px; }

.handle-row .remove {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--mute);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.handle-row .remove:hover { background: var(--bg); color: var(--ink); }

.link-button {
  border: 0;
  background: none;
  padding: 6px 0;
  color: var(--teal);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.link-button[hidden] { display: none; }

.consent {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: start;
  margin: 4px 0 8px;
}

.consent input {
  width: 22px;
  height: 22px;
  margin: 1px 0 0;
  accent-color: var(--teal);
}

.consent label { margin: 0; font-size: 14px; font-weight: 400; color: var(--ink); }

.error { margin: 6px 0 0; font-size: 13px; color: var(--danger); }

.form-error {
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: #fdf0ef;
  color: var(--danger);
  font-size: 14px;
  font-weight: 500;
}

.submit {
  display: block;
  width: 100%;
  margin-top: 18px;
  padding: 15px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.1s, opacity 0.15s;
}

.submit:hover { opacity: 0.9; }
.submit:active { transform: scale(0.99); }
.submit:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--teal-soft); }
.submit[disabled] { opacity: 0.55; cursor: progress; }

.fine { margin: 12px 0 0; text-align: center; font-size: 13px; color: var(--mute); }

.done { text-align: center; }
.done h2 { margin: 6px 0 8px; font-size: 24px; letter-spacing: -0.01em; }
.done p { margin: 0; color: var(--mute); }

/* Honeypot: kept in the page for bots, moved out of sight for people. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

[hidden] { display: none !important; }

@media (min-width: 560px) {
  .wrap { padding-top: 48px; }
  .card { padding: 28px; }
}
