:root {
  --ink: #16232e;
  --ink-soft: #4c5c68;
  --paper: #f7f6f2;
  --card: #ffffff;
  --brand: #1c5d99;
  --brand-deep: #123f68;
  --accent: #3e7c59;
  --accent-soft: #e7f0ea;
  --line: #e3e0d8;
  --danger: #a33b2e;
  --radius: 14px;
  --shadow: 0 2px 14px rgba(22, 35, 46, 0.08);
  font-size: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 640px; margin: 0 auto; padding: 16px 16px 96px; }

/* Header */
header.site {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 4px;
}
header.site .logo { font-weight: 700; letter-spacing: 0.2px; color: var(--brand-deep); font-size: 1.02rem; }
header.site .logo span { color: var(--accent); }
.license { font-size: 0.72rem; color: var(--ink-soft); }

/* Landing */
.hero { text-align: center; padding: 28px 8px 12px; }
.hero h1 { font-size: 1.85rem; line-height: 1.18; color: var(--brand-deep); }
.hero p.sub { margin: 14px auto 0; max-width: 480px; color: var(--ink-soft); font-size: 1.02rem; line-height: 1.5; }
.trust { margin: 22px 0 8px; display: grid; gap: 10px; text-align: left; }
.trust .t {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start; font-size: 0.92rem;
}
.trust .t b { color: var(--brand-deep); }
.trust .t .ico { flex: 0 0 auto; font-size: 1.05rem; }
.counterline { text-align: center; font-size: 0.85rem; color: var(--ink-soft); margin: 14px 0 4px; }
.counterline b { color: var(--accent); font-size: 1rem; }
.marquee { overflow: hidden; white-space: nowrap; margin: 6px -16px 0; mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-inner { display: inline-block; animation: scroll 55s linear infinite; font-size: 0.8rem; color: var(--ink-soft); }
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.timefree { text-align: center; color: var(--ink-soft); font-size: 0.85rem; margin-top: 16px; }

/* Buttons */
.btn {
  display: inline-block; border: 0; cursor: pointer; font: inherit;
  background: var(--brand); color: #fff; font-weight: 650;
  padding: 15px 26px; border-radius: 999px; font-size: 1.05rem;
  box-shadow: var(--shadow); transition: transform 0.06s ease, background 0.15s;
  width: 100%; text-align: center;
}
.btn:active { transform: scale(0.985); }
.btn:hover { background: var(--brand-deep); }
.btn.secondary { background: transparent; color: var(--brand); box-shadow: none; border: 1.5px solid var(--brand); }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn-row { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }

/* Progress */
.progress { position: sticky; top: 0; z-index: 5; background: var(--paper); padding: 10px 0 8px; }
.progress .stage { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); display: flex; justify-content: space-between; margin-bottom: 6px; }
.bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--brand)); border-radius: 3px; transition: width 0.4s ease; }

/* Steps */
.step h2 { font-size: 1.34rem; line-height: 1.25; color: var(--brand-deep); margin: 18px 0 4px; }
.step p.help { color: var(--ink-soft); font-size: 0.92rem; margin-bottom: 14px; }
.opts { display: grid; gap: 10px; }
.opt {
  background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; cursor: pointer; transition: border-color 0.12s, background 0.12s;
  display: flex; gap: 12px; align-items: center; text-align: left; font: inherit; width: 100%;
}
.opt .ico { font-size: 1.25rem; flex: 0 0 auto; }
.opt .lbl { font-weight: 600; font-size: 0.98rem; }
.opt .sub { color: var(--ink-soft); font-size: 0.82rem; margin-top: 2px; line-height: 1.35; }
.opt:hover { border-color: var(--brand); }
.opt.sel { border-color: var(--accent); background: var(--accent-soft); }
.opt.sel .lbl { color: var(--accent); }

select, input[type="text"], input[type="email"], input[type="tel"], textarea {
  width: 100%; font: inherit; padding: 13px 14px; border: 1.5px solid var(--line);
  border-radius: 10px; background: var(--card); color: var(--ink);
}
textarea { min-height: 90px; resize: vertical; }
label.fld { display: block; font-size: 0.85rem; font-weight: 600; color: var(--ink-soft); margin: 14px 0 6px; }

/* Budget */
.sliders { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 16px; }
.slider-vals { display: flex; justify-content: space-between; font-weight: 700; color: var(--brand-deep); font-size: 1.05rem; margin-bottom: 8px; }
input[type="range"] { width: 100%; accent-color: var(--brand); }
.tiers { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.tier { border: 1.5px solid var(--line); background: var(--card); border-radius: 10px; padding: 10px 6px; font: inherit; font-size: 0.8rem; cursor: pointer; text-align: center; }
.tier b { display: block; font-size: 0.68rem; letter-spacing: 0.06em; color: var(--accent); }
.tier.sel { border-color: var(--accent); background: var(--accent-soft); }
.estimator {
  margin-top: 14px; background: var(--brand-deep); color: #fff; border-radius: var(--radius);
  padding: 14px 16px; display: flex; justify-content: space-between; align-items: center;
}
.estimator .big { font-size: 1.45rem; font-weight: 750; }
.estimator .cap { font-size: 0.72rem; opacity: 0.85; max-width: 200px; text-align: right; line-height: 1.35; }

/* Ack strip */
.ack {
  margin: 16px 0 4px; min-height: 58px; border-left: 3px solid var(--accent);
  background: var(--accent-soft); border-radius: 0 var(--radius) var(--radius) 0;
  padding: 12px 14px; font-size: 0.92rem; line-height: 1.5; color: #2b4638;
  visibility: hidden;
}
.ack.on { visibility: visible; animation: fadein 0.25s ease; }
.ack .who { font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); font-weight: 700; display: block; margin-bottom: 3px; }
.ack .caret { display: inline-block; width: 7px; height: 1em; background: var(--accent); vertical-align: text-bottom; animation: blink 0.9s steps(1) infinite; margin-left: 1px; }
@keyframes blink { 50% { opacity: 0; } }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; } }

/* Summary */
.sumrow { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 8px; }
.sumrow .k { font-size: 0.72rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-soft); }
.sumrow .v { font-weight: 600; font-size: 0.92rem; margin-top: 2px; }
.sumrow button { font: inherit; font-size: 0.8rem; color: var(--brand); background: none; border: none; cursor: pointer; font-weight: 650; }

/* Gate */
.gate h2 { text-align: center; }
.gate .almost { text-align: center; color: var(--accent); font-weight: 750; letter-spacing: 0.1em; font-size: 0.78rem; text-transform: uppercase; margin-top: 20px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 0.75rem; color: var(--ink-soft); line-height: 1.45; margin: 14px 0; }
.consent input { margin-top: 3px; transform: scale(1.15); accent-color: var(--brand); }
.trustline { text-align: center; font-size: 0.75rem; color: var(--ink-soft); margin-top: 10px; }
.code-row { display: flex; gap: 8px; margin-top: 8px; }
.code-row input { text-align: center; font-size: 1.3rem; letter-spacing: 0.35em; font-weight: 700; }
.err { color: var(--danger); font-size: 0.85rem; margin-top: 8px; display: none; }
.err.on { display: block; }

/* Results */
.match { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; box-shadow: var(--shadow); }
.match .rank { font-size: 0.7rem; letter-spacing: 0.1em; color: var(--accent); font-weight: 750; text-transform: uppercase; }
.match h3 { color: var(--brand-deep); font-size: 1.25rem; margin: 4px 0 2px; }
.match .cityline { color: var(--ink-soft); font-size: 0.85rem; margin-bottom: 10px; }
.match .facts { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.match .facts span { background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font-size: 0.75rem; color: var(--ink-soft); }
.match .why { font-size: 0.9rem; line-height: 1.5; }
.match .why b { color: var(--accent); }
.match .trade { font-size: 0.83rem; color: var(--ink-soft); margin-top: 8px; line-height: 1.45; }
.match .trade b { color: var(--danger); font-weight: 650; }
.next-cta { background: var(--brand-deep); color: #fff; border-radius: var(--radius); padding: 20px 18px; text-align: center; margin-top: 20px; }
.next-cta p { font-size: 0.9rem; opacity: 0.9; margin-bottom: 14px; }
.next-cta .btn { background: #fff; color: var(--brand-deep); }

/* Sticky footer nav + escape hatch */
.footbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 10;
  background: linear-gradient(transparent, var(--paper) 30%);
  padding: 18px 16px 16px;
}
.footbar-inner { max-width: 640px; margin: 0 auto; display: flex; gap: 10px; align-items: center; }
.footbar .btn { flex: 1; }
.backlink { font: inherit; background: none; border: none; color: var(--ink-soft); cursor: pointer; font-size: 0.9rem; padding: 10px; }
.sms-hatch {
  position: fixed; top: 12px; right: 12px; z-index: 20;
  background: var(--card); border: 1.5px solid var(--line); border-radius: 999px;
  padding: 8px 14px; font-size: 0.82rem; font-weight: 650; color: var(--brand);
  text-decoration: none; box-shadow: var(--shadow);
}

@media (max-width: 559px) {
  header.site { padding-right: 110px; } /* clear the Text Brian pill */
  header.site .license { display: none; } /* license # stays in the footer disclaimer */
}

.hidden { display: none !important; }
.disclaimer { font-size: 0.72rem; color: var(--ink-soft); line-height: 1.5; margin-top: 26px; text-align: center; }

@media (min-width: 560px) {
  .hero h1 { font-size: 2.2rem; }
  .trust { grid-template-columns: 1fr 1fr; }
  .btn { width: auto; min-width: 260px; }
  .btn-row { align-items: center; }
}
