/* Per-state registration pages (/join/<state>). Mobile first: most people
   arrive from a WhatsApp link on a phone. */
:root {
  --green: #0b6b3a; --green-dark: #084d2a; --gold: #ffd200; --ink: #16241c;
  --muted: #5b6b60; --line: #dfe7e2; --bg: #f4f7f5; --danger: #b42318; --ok: #0b6b3a;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: clip; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Inter, Arial, sans-serif;
  background: var(--bg); color: var(--ink); font-size: 16px; line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; display: block; }
a { color: var(--green); }
[hidden] { display: none !important; }

.top {
  background: var(--green); color: #fff; padding: 10px 16px;
  display: flex; align-items: center; gap: 10px;
}
.top img { width: 36px; height: 36px; border-radius: 50%; background: #fff; }
.top strong { font-size: 17px; letter-spacing: .02em; }
.top a { margin-left: auto; color: #fff; font-size: 14px; opacity: .9; text-decoration: none; white-space: nowrap; }

.wrap { width: 100%; max-width: 640px; margin: 0 auto; padding: 0 14px 40px; }

.hero {
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  color: #fff; border-radius: 0 0 18px 18px; margin: 0 -14px 18px; padding: 22px 18px 20px;
}
.eyebrow { margin: 0 0 4px; color: var(--gold); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .1em; }
.hero h1 { margin: 0 0 8px; font-size: clamp(24px, 6.4vw, 32px); line-height: 1.15; }
.hero p { margin: 0 0 12px; color: rgba(255,255,255,.9); }
.need { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.need li { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); border-radius: 999px; padding: 4px 12px; font-size: 13px; }

.card { background: #fff; border-radius: 14px; box-shadow: 0 1px 3px rgba(0,0,0,.06); padding: 18px 16px; margin-bottom: 14px; border: 0; min-width: 0; }
.card legend { float: left; width: 100%; padding: 0; margin: 0 0 12px; font-weight: 800; font-size: 17px; color: var(--green); }
.card legend + * { clear: both; }
.step { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--gold); color: var(--ink); font-size: 14px; margin-right: 8px; }

.field { margin-bottom: 14px; min-width: 0; }
.field:last-child { margin-bottom: 0; }
label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.req { color: var(--danger); }
.opt { color: var(--muted); font-weight: 400; }
.hint { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
input[type=text], input[type=tel], input[type=email], input[type=date], select, textarea {
  width: 100%; max-width: 100%; min-height: 48px; padding: 11px 12px;
  font: inherit; font-size: 16px; color: var(--ink);
  background: #fff; border: 1px solid #c4cfc8; border-radius: 10px; appearance: none; -webkit-appearance: none;
}
select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 34px; }
input[type=date] { display: block; }
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(255,210,0,.6); border-color: var(--green); }
.invalid input, .invalid select, .invalid textarea, .invalid .photo { border-color: var(--danger); background-color: #fff8f7; }
.err { display: none; color: var(--danger); font-size: 13px; margin-top: 6px; }
.invalid .err { display: block; }
.row2 { display: grid; grid-template-columns: 1fr; gap: 0 12px; }
@media (min-width: 520px) { .row2 { grid-template-columns: 1fr 1fr; } }

.locked { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; padding: 10px 12px; border-radius: 10px; background: #eef6f1; border: 1px solid #cfe3d7; font-weight: 700; }
.locked span { font-weight: 400; color: var(--muted); font-size: 13px; }

.vin { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .08em; text-transform: uppercase; }
.count { float: right; font-weight: 400; color: var(--muted); font-size: 13px; }

.photo {
  position: relative; display: flex; align-items: center; gap: 14px; padding: 12px;
  border: 2px dashed #b9c8bf; border-radius: 12px; background: #fafcfb; cursor: pointer; min-height: 88px;
}
.photo input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.photo .thumb { flex: 0 0 auto; width: 64px; height: 64px; border-radius: 10px; background: #e8efeb center/cover no-repeat; display: grid; place-items: center; color: var(--muted); font-size: 26px; }
.photo.passport .thumb { border-radius: 50%; }
.photo .txt { min-width: 0; }
.photo .txt b { display: block; }
.photo .txt small { color: var(--muted); }
.photo.has { border-style: solid; border-color: var(--green); background: #f3faf6; }

.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 14px; }
.check input { width: 22px; height: 22px; flex: 0 0 auto; margin-top: 2px; accent-color: var(--green); }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 52px; border: 0; border-radius: 12px; padding: 12px 18px;
  background: var(--green); color: #fff; font: inherit; font-weight: 700; font-size: 17px; cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--green-dark); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn.alt { background: #fff; color: var(--green); border: 2px solid var(--green); }
.btn.wa { background: #1fa855; }

.msg { border-radius: 10px; padding: 12px 14px; margin: 12px 0 0; font-size: 15px; }
.msg.err-box { background: #fdecea; color: var(--danger); }
.msg.info { background: #eef6f1; color: var(--green); }

.done { text-align: center; }
.done .tick { width: 64px; height: 64px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-size: 34px; margin: 6px auto 12px; }
.done h2 { margin: 0 0 6px; }
.done .ref { display: inline-block; margin: 8px 0 16px; padding: 6px 14px; border-radius: 999px; background: #fff6cc; font-weight: 700; }
.done .actions { display: grid; gap: 10px; margin-top: 10px; }

.foot { color: var(--muted); font-size: 13px; text-align: center; padding: 8px 14px 30px; }
.foot p { margin: 4px 0; }

/* State directory (/join/states) */
.zone { margin-bottom: 14px; }
.zone h2 { font-size: 16px; color: var(--green); margin: 0 0 10px; }
.slist { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.slist li { display: flex; align-items: center; gap: 8px; min-width: 0; }
.slist a.name { flex: 1 1 auto; min-width: 0; display: block; padding: 10px 12px; border-radius: 10px; background: #f3faf6; border: 1px solid #d6e8dd; font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
.slist a.name small { display: block; font-weight: 400; color: var(--muted); }
.slist button, .slist a.share { flex: 0 0 auto; min-height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid #c4cfc8; background: #fff; font: inherit; font-size: 14px; color: var(--ink); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; }
@media (max-width: 480px) {
  .slist li { flex-wrap: wrap; }
  .slist a.name { flex-basis: 100%; }
  .slist button, .slist a.share { flex: 1 1 0; justify-content: center; }
}
