/* The form (/). Phone first: 16px gutters, 52px inputs, 17px text (no iOS zoom on focus). */

.topbar { background: var(--mast-bg); border-bottom: 3px solid var(--gold); padding: 12px 16px; }
.topbar-logo { display: block; width: 132px; margin: 0 auto; }
.topbar-logo img { display: block; width: 100%; height: auto; }

.shell { width: 100%; max-width: 600px; margin: 0 auto; padding: 24px 16px 40px; }

/* intro */
.intro { padding: 12px 0 8px; }
.eyebrow { color: var(--blue-ink); font: 700 0.8rem/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; margin-bottom: 14px; }
.intro h1 { font-size: clamp(2.1rem, 9vw, 3.1rem); font-weight: 700; margin-bottom: 16px; text-wrap: balance; }
.intro-sub { font-size: 1.1rem; color: var(--text); margin-bottom: 28px; }
.btn-block { width: 100%; }

/* progress */
.progress { margin-bottom: 22px; }
.progress-row { display: flex; justify-content: space-between; font: 700 0.8rem/1 var(--font-body); color: var(--muted); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 8px; }
.progress-bar { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--blue), var(--gold)); border-radius: inherit; transition: width .35s ease; }

.edit-note { background: var(--blue-soft); border-left: 4px solid var(--blue); padding: 10px 12px; border-radius: 8px; font-size: 0.92rem; margin-bottom: 18px; }

/* steps */
.step { border: 0; margin: 0; padding: 0; min-width: 0; }
.step-title { font: 700 clamp(1.7rem, 7vw, 2.2rem)/1.1 var(--font-head); color: var(--heading); padding: 0; margin-bottom: 8px; outline: none; }
.step-sub { color: var(--muted); margin-bottom: 22px; }
.fields { display: flex; flex-wrap: wrap; gap: 0 12px; }
.field { width: 100%; margin-bottom: 20px; }
.field.half { width: calc(50% - 6px); }
.label { display: block; font-weight: 700; color: var(--heading); margin: 0 0 8px; font-size: 1rem; line-height: 1.35; }

.input {
  width: 100%; min-height: 52px; padding: 12px 14px; font: 400 17px/1.3 var(--font-body);
  color: var(--text); background: var(--surface); border: 2px solid var(--line); border-radius: 12px;
  appearance: none; -webkit-appearance: none;
}
.input::placeholder { color: var(--muted); opacity: 0.8; }
.input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.has-error .input { border-color: var(--danger); }
.is-estimated .input { background: var(--gold-soft); border-color: var(--gold); }
.select-wrap { position: relative; }
.select-wrap::after { content: ""; position: absolute; right: 16px; top: 50%; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.select-wrap .input { padding-right: 40px; }

.affix { position: relative; }
.affix-pre, .affix-post { position: absolute; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 700; pointer-events: none; }
.affix-pre { left: 14px; }
.affix-post { right: 14px; }
.affix-pre + .input { padding-left: 28px; }
.affix .input:has(+ .affix-post) { padding-right: 34px; }

.chip-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.chip {
  min-height: 40px; padding: 8px 14px; border-radius: 999px; border: 2px dashed var(--line);
  background: transparent; color: var(--text); font: 600 0.88rem/1.2 var(--font-body); cursor: pointer; text-align: left;
}
.chip:hover { border-color: var(--muted); }
.chip[aria-pressed="true"] { border-style: solid; border-color: var(--gold); background: var(--gold-soft); color: var(--gold-ink); }

.bench { margin: 8px 0 0; font-size: 0.82rem; color: var(--muted); line-height: 1.4; }
.bench:empty, .err:empty, .live:empty { display: none; }
.live { margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--blue-soft); color: var(--heading); font-weight: 700; font-size: 0.95rem; }
.err { margin: 8px 0 0; color: var(--danger); font-weight: 700; font-size: 0.9rem; }

/* radios + checkboxes as tappable cards */
.choices { display: grid; gap: 8px; }
.choices-wrap { grid-template-columns: 1fr 1fr; }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice span {
  display: flex; align-items: center; min-height: 50px; padding: 10px 14px 10px 44px; border: 2px solid var(--line);
  border-radius: 12px; background: var(--surface); font-weight: 600; line-height: 1.25; position: relative;
}
.choice span::before {
  content: ""; position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%);
  border: 2px solid var(--muted); border-radius: 50%; background: var(--surface);
}
.choice input[type="checkbox"] + span::before { border-radius: 5px; }
.choice input:checked + span { border-color: var(--blue); background: var(--blue-soft); color: var(--heading); }
.choice input:checked + span::before { border-color: var(--blue); background: var(--blue); box-shadow: inset 0 0 0 3px var(--surface); }
.choice input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.choices-wrap .choice span { font-size: 0.9rem; }

/* local advertising follow-ups: revealed in place when "Other local advertising" is checked */
.reveal { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .3s ease, opacity .25s ease; }
.reveal.open { grid-template-rows: 1fr; opacity: 1; }
.reveal-inner { overflow: hidden; min-height: 0; }
.trad-panel { margin-top: 14px; padding: 16px 14px 0; border: 2px solid var(--blue); border-radius: 14px; background: var(--blue-soft); }
.trad-panel .field:last-child { margin-bottom: 14px; }
.trad-panel .choice span { background: var(--surface); }

/* slider */
.slider { display: flex; align-items: center; gap: 14px; }
.slider input[type="range"] { flex: 1; accent-color: var(--blue); height: 32px; }
.slider-out { flex: none; min-width: 92px; text-align: center; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); font: 700 1rem/1 var(--font-head); color: var(--heading); }

/* consent */
.consent { margin-bottom: 14px; }
.check { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; cursor: pointer; font-size: 0.95rem; line-height: 1.45; }
.check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--blue); }
.consent[data-field="consentSms"] .check { font-size: 0.85rem; color: var(--muted); }
.turnstile { min-height: 70px; margin: 10px 0 6px; }

/* nav */
.nav { display: flex; gap: 10px; margin-top: 8px; position: sticky; bottom: 0; padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line); }
.nav .btn { flex: 1; min-height: 52px; font-size: 1rem; }
.nav #btn-back { flex: 0 0 34%; }

/* building */
.building { text-align: center; padding: 64px 0; }
.building img { margin-bottom: 18px; animation: pulse 1.2s ease-in-out infinite; }
.building-t { font: 700 1.4rem/1.2 var(--font-head); color: var(--heading); margin-bottom: 20px; }
.building .progress-bar span { transition: width .9s ease-out; }
@keyframes pulse { 50% { transform: scale(1.08); } }

.site-foot { max-width: 600px; margin: 0 auto; padding: 8px 16px 32px; text-align: center; color: var(--muted); font-size: 0.82rem; }
.site-foot nav { display: flex; justify-content: center; gap: 18px; margin-bottom: 8px; }

@media (min-width: 720px) {
  .topbar { padding: 14px 24px; }
  .topbar-logo { width: 160px; margin: 0; }
  .shell { padding-top: 48px; }
  .choices-wrap { grid-template-columns: 1fr 1fr 1fr; }
  .nav { position: static; border-top: 0; background: transparent; }
}
