@font-face {
  font-family: "Manrope";
  src: url("/fonts/manrope-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}

:root {
  --orange: #ff6b35;
  --orange-deep: #e8590c;
  --cream: #fff4ee;
  --ink: #17171c;
  --ink-2: #4b4f58;
  --ink-3: #8a8f99;
  --field: #c9ccd2;
  --red: #d92d20;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: "Manrope", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

[hidden] { display: none !important; }

.screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  max-width: 520px;
  margin: 0 auto;
}

/* ---------- Form ---------- */
.top { background: var(--orange); color: #fff; padding: 30px 24px 26px; padding-top: max(30px, env(safe-area-inset-top)); }
.eyebrow { font-size: 15px; font-weight: 600; opacity: .95; }
.top h1 { margin: 6px 0 0; font-size: 31px; font-weight: 600; letter-spacing: -.3px; line-height: 1.15; }

.form {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 26px 24px;
  padding-bottom: max(26px, env(safe-area-inset-bottom));
}
.field { display: block; margin-bottom: 20px; position: relative; }
.label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 8px; }
.label b { color: var(--red); font-weight: 600; }

input:not([type=checkbox]), select {
  width: 100%;
  height: 52px;
  border: 1px solid var(--field);
  border-radius: 6px;
  padding: 0 15px;
  font: inherit;
  font-size: 17px;   /* >= 16px keeps iOS from zooming */
  color: var(--ink);
  background: #fff;
  appearance: none;
  -webkit-appearance: none;
}
input::placeholder { color: var(--ink-3); }
input:focus, select:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255, 107, 53, .2); }
input.invalid, select.invalid { border-color: var(--red); }

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

.row { display: flex; gap: 14px; }
.city-field { flex: 1; min-width: 0; }
.state-field { width: 120px; flex: none; }

.suggest {
  position: absolute;
  z-index: 10;
  left: 0;
  right: -134px;
  top: 100%;
  margin: 4px 0 0;
  padding: 4px 0;
  list-style: none;
  background: #fff;
  border: 1px solid var(--field);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .12);
  max-height: 290px;
  overflow-y: auto;
}
.suggest li { padding: 12px 15px; font-size: 16px; cursor: pointer; }
.suggest li span { color: var(--ink-3); margin-left: 6px; }
.suggest li.active, .suggest li:active { background: var(--cream); }

.toggle { display: flex; align-items: center; justify-content: space-between; margin: 6px 0 14px; font-size: 16px; color: var(--ink-2); cursor: pointer; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.switch { width: 52px; height: 30px; border-radius: 999px; background: #d4d6db; position: relative; transition: background .2s; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .2s; }
.toggle input:checked + .switch { background: var(--orange); }
.toggle input:checked + .switch::after { transform: translateX(22px); }
.toggle input:focus-visible + .switch { box-shadow: 0 0 0 3px rgba(255, 107, 53, .3); }

.note { margin: 4px 0 0; font-size: 14px; color: var(--ink-2); }
.error { margin: 12px 0 0; color: var(--red); font-size: 15px; font-weight: 600; min-height: 1px; }
.spacer { flex: 1; min-height: 24px; }

.btn {
  display: block;
  width: 100%;
  height: 54px;
  border: 0;
  border-radius: 6px;
  background: var(--orange-deep);
  color: #fff;
  font: inherit;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  line-height: 54px;
  cursor: pointer;
}
.btn:active { filter: brightness(.93); }
.btn[disabled] { opacity: .65; }

/* ---------- Success ---------- */
.success {
  background: var(--cream);
  max-width: none;
  align-items: center;
  text-align: center;
  padding: 56px 24px 24px;
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}
.success > * { width: 100%; max-width: 472px; }
.pin-badge {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--orange);
  display: grid;
  place-items: center;
  animation: badge-drop .9s cubic-bezier(.3, 1.6, .5, 1) both;
}
@keyframes badge-drop {
  0% { transform: translateY(-60px) scale(.6); opacity: 0; }
  100% { transform: none; opacity: 1; }
}
.success h1 { margin: 26px 0 8px; font-size: 30px; font-weight: 700; letter-spacing: -.3px; }
.lead { margin: 0; font-size: 17px; color: var(--ink-2); line-height: 1.5; }
.lead strong { color: var(--ink); }

.tally {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .08);
  margin-top: 22px;
  padding: 20px 0;
}
.tally > div + div { border-left: 1px solid #e8e8ec; }
.big { font-size: 32px; font-weight: 800; }
.small { font-size: 15px; color: var(--ink-2); margin-top: 2px; }

.promo { background: #fff; border-radius: 8px; padding: 22px; text-align: left; }
.promo h2 { margin: 0 0 8px; font-size: 20px; font-weight: 700; }
.promo p { margin: 0 0 18px; font-size: 15px; line-height: 1.55; color: var(--ink-2); }

.again { margin-top: 16px; background: none; border: 0; color: var(--ink-3); font: inherit; font-size: 14px; text-decoration: underline; padding: 8px; cursor: pointer; }
