/* Shared styles for the Meta pre-lander kit.
   The look follows the SellHouseFast cash offer page the visitor lands on next, so the hand-off
   feels like one experience: Kumbh Sans, white panels, #0956bb buttons (hover #0070ff),
   ink #212529, muted #4A5565, surface #f8f9fa, 6px control radius. */

:root {
  --blue: #0956bb;        /* C version button blue */
  --blue-bright: #0070ff; /* brand blue / hover */
  --blue-deep: #266bac;
  --blue-soft: #e8f1ff;
  --pill-bg: #eff6ff;
  --green: #2f9e44;
  --ink: #212529;
  --muted: #4a5565;
  --surface: #f8f9fa;
  --line: #e6ecf3;
  --line-strong: rgba(33, 37, 41, .15);
  --amber: #b45309;
  --red: #b42318;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-ctl: 6px;
  --shadow: 0 10px 30px rgba(2, 32, 71, .06);
  --shadow-lg: 0 30px 60px -28px rgba(9, 86, 187, .5), 0 2px 10px rgba(20, 30, 55, .08);
  --font: 'Kumbh Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: #fff;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--blue-bright); outline-offset: 2px; }
h1:focus, h2:focus, h1:focus-visible, h2:focus-visible { outline: none; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -120px; z-index: 100; background: #fff; color: var(--blue);
  padding: 10px 14px; border-radius: var(--radius-ctl); box-shadow: var(--shadow); font-weight: 700;
}
.skip-link:focus { top: 12px; }

/* ---------- header bits ---------- */
/* Neutral placeholder for your own logo. Replace the span with your logo image. */
.logo-slot {
  display: inline-flex; align-items: center; justify-content: center; width: 140px; height: 36px; flex: none;
  border: 2px dashed #b9c6d8; border-radius: 8px; background: rgba(255, 255, 255, .92);
  font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #6b7a8c;
}
.step-count {
  font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); white-space: nowrap;
}

/* Demo / coverage-off banner, added by shared.js */
.demo-banner {
  position: relative; z-index: 60; display: flex; flex-wrap: wrap; gap: 2px 8px; justify-content: center;
  padding: 7px 14px; font-size: 13px; line-height: 1.35; text-align: center;
  background: #fff7e6; color: #7a3d06; border-bottom: 1px solid #f3d7a8;
}
.demo-banner strong { color: var(--amber); }

/* Legal footer: who you are dealing with, disclaimer, Terms and Privacy */
.legal { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.legal p { margin: 0; }
.legal-who strong { color: var(--ink); font-weight: 700; }
.legal-links { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.legal-links a { color: inherit; font-weight: 600; }
.legal--dark { color: rgba(255, 255, 255, .88); text-shadow: 0 1px 3px rgba(0, 0, 0, .5); }
.legal--dark .legal-who strong { color: #fff; }
.legal--dark a { color: #fff; }
.legal--sheet { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px; font-size: 12px; }

/* Bot-check slots on the confirm step */
.turnstile-slot { min-height: 65px; font-size: 14px; color: var(--red); }
.confirm-note { font-size: 14px; font-weight: 600; color: var(--amber); background: #fff7e6; border-radius: 8px; padding: 8px 10px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--blue); background: var(--pill-bg); border-radius: 999px; padding: 5px 12px;
}
.pill button {
  border: 0; background: none; padding: 0; cursor: pointer; color: inherit;
  font-size: 11px; letter-spacing: 0; text-transform: none; text-decoration: underline; font-weight: 600; opacity: .85;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 48px; padding: 12px 18px;
  border-radius: var(--radius-ctl); border: 1px solid transparent;
  font-size: 16px; font-weight: 600; line-height: 1.25; text-align: center; text-decoration: none;
  cursor: pointer; transition: background-color .15s ease, border-color .15s ease, transform .1s ease;
}
.btn:active { transform: scale(.98); }
.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-bright); }
.btn--secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn--secondary:hover { background: #eef1f5; }
.btn--ghost { background: transparent; color: var(--muted); border: 0; width: auto; min-height: 40px; padding: 8px 4px; text-decoration: underline; font-weight: 500; font-size: 15px; }
.btn--ghost:hover { color: var(--ink); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; flex: none; }

.back-btn {
  display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; cursor: pointer;
  color: var(--muted); font-size: 14px; font-weight: 600; padding: 6px 2px; min-height: 40px;
}
.back-btn:hover { color: var(--ink); }
.back-btn svg { width: 18px; height: 18px; }

/* Choice buttons (aria-pressed) used for tap-to-answer */
.choice {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px;
  padding: 14px 16px; text-align: left; cursor: pointer;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: var(--radius-ctl);
  font-size: 16px; font-weight: 600; line-height: 1.3;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .1s ease;
}
.choice:hover { border-color: var(--blue); background: #fff; }
.choice:active { transform: scale(.99); }
.choice[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }
.choice .choice-dot {
  flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid rgba(33, 37, 41, .3); background: #fff;
  display: grid; place-items: center;
}
.choice[aria-pressed="true"] .choice-dot { border-color: #fff; background: #fff; }
.choice[aria-pressed="true"] .choice-dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--blue); }

/* ---------- address field + mock autocomplete ---------- */
.field-label { display: block; font-size: 14px; font-weight: 500; color: var(--muted); margin-bottom: 8px; }
.combo { position: relative; }
.combo-input-wrap { position: relative; }
.combo-input-wrap svg.combo-pin {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: #94a3b8; pointer-events: none;
}
.text-input {
  width: 100%; min-height: 48px; padding: 10px 12px 10px 38px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-ctl); background: #fff;
  font-size: 16px; color: var(--ink);
}
.text-input::placeholder { color: #94a3b8; }
.text-input:focus { outline: none; border-color: var(--blue-bright); box-shadow: 0 0 0 3px rgba(0, 112, 255, .2); }
.text-input[aria-invalid="true"] { border-color: var(--red); }
.combo-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30;
  list-style: none; padding: 6px; margin: 0; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: 0 18px 40px rgba(2, 32, 71, .16);
  max-height: 280px; overflow-y: auto;
}
.combo-list .combo-head { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #94a3b8; padding: 6px 10px 4px; }
.combo-opt {
  display: flex; align-items: flex-start; gap: 10px; padding: 10px; border-radius: 8px; cursor: pointer; color: var(--ink);
  font-size: 15px; line-height: 1.3;
}
.combo-opt svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: #94a3b8; }
.combo-opt small { display: block; color: var(--muted); font-size: 13px; }
.combo-opt[aria-selected="true"], .combo-opt:hover { background: var(--blue-soft); }
.field-hint { font-size: 13px; color: var(--muted); margin-top: 8px; }
.field-hint button { border: 0; background: none; padding: 0; color: var(--blue); text-decoration: underline; cursor: pointer; font-size: 13px; font-weight: 600; }
.field-error { font-size: 14px; color: var(--red); margin-top: 8px; font-weight: 500; }

/* ---------- trust row ---------- */
.trust { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 13px; color: var(--muted); }
.trust span { display: inline-flex; align-items: center; gap: 6px; }
.trust svg { width: 16px; height: 16px; color: var(--green); flex: none; }

/* ---------- exit screens ---------- */
.exit { display: flex; flex-direction: column; gap: 16px; }
.exit-icon { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); }
.exit-icon svg { width: 26px; height: 26px; }
.exit h2 { font-size: clamp(22px, 4.5vw, 28px); line-height: 1.2; font-weight: 700; }
.exit p { color: var(--muted); font-size: 16px; }
.alt-path {
  border: 2px dashed #c3d3ea; border-radius: var(--radius-sm); background: #f6f9fe; padding: 16px;
  display: flex; flex-direction: column; gap: 6px;
}
.alt-path strong { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--blue); }
.alt-path span { font-size: 15px; color: var(--ink); }
.exit-actions { display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: center; }

/* ---------- hand-off ---------- */
.handoff { display: flex; flex-direction: column; gap: 18px; }
.handoff-status { display: flex; flex-direction: column; gap: 10px; }
.handoff-top { display: flex; align-items: center; gap: 12px; }
.handoff-icon { width: 44px; height: 44px; border-radius: 50%; flex: none; display: grid; place-items: center; }
.handoff-spinner { border: 4px solid var(--blue-soft); border-top-color: var(--blue-bright); animation: shf-spin .8s linear infinite; }
.handoff-check { background: var(--green); color: #fff; }
.handoff-check svg { width: 24px; height: 24px; }
.handoff h2 { font-size: clamp(22px, 4.5vw, 28px); line-height: 1.2; font-weight: 700; }
.handoff-addr { font-size: 15px; color: var(--muted); }
.handoff-addr strong { color: var(--ink); font-weight: 600; }
.progress { height: 6px; border-radius: 99px; background: var(--blue-soft); overflow: hidden; }
.progress > span { display: block; height: 100%; width: 0; background: var(--blue-bright); border-radius: inherit; transition: width .3s ease; }
.handoff[data-state="going"] .progress > span { animation: shf-fill 1.8s ease-out forwards; }
.handoff[data-state="ready"] .progress > span { width: 100%; background: var(--green); }
.handoff-ready { font-size: 15px; color: var(--ink); }

.partner-panel { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.partner-panel summary {
  cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 14px; font-size: 14px; font-weight: 700; color: var(--ink);
}
.partner-panel summary::-webkit-details-marker { display: none; }
.partner-panel summary .tag { white-space: nowrap; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--amber); background: #fff7e6; border-radius: 99px; padding: 3px 8px; font-weight: 700; }
.partner-panel summary svg { width: 16px; height: 16px; transition: transform .2s ease; flex: none; }
.partner-panel[open] summary svg { transform: rotate(180deg); }
.partner-body { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; color: var(--muted); }
.url-box {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.55;
  background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; color: var(--ink);
  overflow-wrap: anywhere; word-break: break-all;
}
.url-box .p-key { color: var(--blue); font-weight: 700; }
.param-list { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 0; font-size: 13px; }
.param-list dt { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--blue); font-weight: 700; }
.param-list dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.preview-link { display: inline-flex; align-items: center; gap: 6px; color: var(--blue); font-weight: 700; text-decoration: underline; font-size: 15px; }
.preview-link svg { width: 16px; height: 16px; }

/* ---------- house sample photo ---------- */
.house-scene { position: absolute; inset: 0; overflow: hidden; background: #cfe3f6; }
.house-scene svg { width: 100%; height: 100%; max-width: none; }
.house-scene .house-sample { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 50% 58%; }
.house-scene .house-photo { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; animation: shf-in .5s ease both; }
.illus-tag {
  position: absolute; right: 10px; bottom: 10px; z-index: 3; font-size: 10px; font-weight: 600; letter-spacing: .04em;
  color: rgba(255, 255, 255, .95); background: rgba(15, 23, 42, .45); padding: 3px 8px; border-radius: 99px;
}

/* ---------- motion ---------- */
@keyframes shf-spin { to { transform: rotate(360deg); } }
@keyframes shf-fill { from { width: 4%; } to { width: 100%; } }
@keyframes shf-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.view-enter { animation: shf-in .3s ease both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

@media (max-width: 479px) { .partner-panel summary .tag { display: none; } }

/* ---------- exit page ---------- */
.x-page { background: #f5f8fd; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.x-header { padding: 16px 20px; }
.x-main { flex: 1; width: 100%; max-width: 600px; margin: 0 auto; padding: 8px 20px 28px; display: flex; flex-direction: column; gap: 22px; }
.x-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); padding: 24px 20px; display: flex; flex-direction: column; gap: 16px; }
.x-card h1 { font-size: clamp(22px, 5vw, 30px); line-height: 1.2; font-weight: 700; }
.x-body { color: var(--muted); font-size: 16px; }
.x-back { width: auto; }
@media (min-width: 768px) { .x-header { padding: 24px 40px; } .x-card { padding: 32px; } }
