/* ==========================================================================
   Keyela — design system
   Principles: flat, square (0 radius), 1px solid borders, brand palette from
   the logo (navy #092348 + orange #FF8128), no box-shadows, no glows,
   no hover animations. Business-grade and calm.
   ========================================================================== */

:root {
  --ink:    #092348;   /* primary text (logo navy)   */
  --muted:  #46587a;   /* secondary text (navy-gray) */
  --line:   #c9d4e4;   /* borders (navy-tinted)      */
  --panel:  #eef3fa;   /* light fill (navy-tinted)   */
  --bg:     #ffffff;   /* page background            */
  --navy:   #092348;   /* primary action (logo navy) */
  --navy-d: #051733;   /* pressed state              */
  --orange:   #ff8128; /* accent (logo key)          */
  --orange-d: #e96f12; /* pressed state              */
  --green:  #1d6b4c;   /* positive / money           */
  --red:    #9b2226;   /* errors                     */
  --maxw:   1320px;   /* 1272px content + 24px gutters */
}

* { box-sizing: border-box; }

/* The hidden attribute must ALWAYS win — author display rules on .btn etc.
   were overriding the browser's [hidden]{display:none} and resurrecting
   buttons the wizard had hidden. */
[hidden] { display: none !important; }

html {
  /* Reserve the scrollbar gutter so centred content doesn't shift a few pixels
     between a short page and a long one — that shift reads as "the nav doesn't
     line up with the page". */
  overflow-y: scroll;
}

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;   /* a stray wide element must never offset the layout */
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--navy); text-decoration: none; }
a.underline { text-decoration: underline; }

h1, h2, h3 { font-weight: 700; line-height: 1.2; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: 2.1rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }
p  { margin: 0 0 1rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Header / nav ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.site-header .bar {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
  gap: 16px;
}
.brand {
  font-weight: 800; font-size: 1.25rem; letter-spacing: .08em;
  color: var(--ink); text-transform: uppercase;
  display: flex; align-items: center;
}
.brand-logo { height: 34px; width: auto; display: block; }
/* The admin nav carries a lot of links. Without wrapping it overflows the
   container and stops lining up with the content below it. */
.nav {
  display: flex; gap: 20px; align-items: center;
  flex-wrap: wrap; justify-content: flex-end;
  min-width: 0;
}
.nav a { color: var(--ink); font-size: .95rem; white-space: nowrap; }
.nav a.active { font-weight: 700; }

/* ---------- Public nav: dropdowns + CTA + mobile slide-out drawer ---------- */
.nav-dd { position: relative; }
.nav-dd-btn {
  display: flex; align-items: center; gap: 5px;
  background: none; border: 0; cursor: pointer; font: inherit; color: var(--ink);
  font-size: .95rem; padding: 20px 0;
}
.nav-dd-btn svg { width: 14px; height: 14px; transition: transform .18s; }
.nav-dd:hover .nav-dd-btn svg, .nav-dd:focus-within .nav-dd-btn svg { transform: rotate(180deg); }
.nav-dd-menu {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(6px);
  min-width: 250px; background: #fff; border-radius: 18px; padding: 14px 8px;
  box-shadow: 0 16px 44px rgba(9, 35, 72, .14);
  opacity: 0; visibility: hidden; transition: opacity .16s ease, transform .16s ease;
  z-index: 60;
}
.nav-dd:hover .nav-dd-menu, .nav-dd:focus-within .nav-dd-menu {
  opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
}
.nav-dd-menu a {
  display: block; padding: 9px 16px; border-radius: 12px; font-size: .93rem;
}
.nav-dd-menu a:hover { background: #f4f7fb; }
.dd-title {
  font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted); padding: 4px 16px 8px;
}
.nav-cta {
  padding: 10px 22px; font-size: .92rem;
  background: var(--orange); border-color: var(--orange); color: #fff !important;
}
.nav-cta:active { background: var(--orange-d); border-color: var(--orange-d); }

.hamburger {
  display: none; background: none; border: 0; cursor: pointer; padding: 10px;
  flex-direction: column; gap: 5px;
}
.hamburger span {
  display: block; width: 24px; height: 2.5px; border-radius: 2px; background: var(--navy);
}

.drawer-backdrop {
  position: fixed; inset: 0; background: rgba(9, 35, 72, .45); z-index: 90;
  opacity: 0; visibility: hidden; transition: opacity .25s ease;
}
.drawer-backdrop.open { opacity: 1; visibility: visible; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(330px, 88vw); z-index: 100;
  background: #fff; border-radius: 24px 0 0 24px;
  transform: translateX(106%); transition: transform .28s cubic-bezier(.32, .72, .28, 1);
  display: flex; flex-direction: column; overflow: hidden;
}
.drawer.open { transform: translateX(0); }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid var(--line);
}
.drawer-close { background: none; border: 0; cursor: pointer; color: var(--navy); padding: 6px; }
.drawer-close svg { width: 22px; height: 22px; display: block; }
.drawer-body { padding: 18px 14px 28px; overflow-y: auto; }
.drawer-body > a {
  display: block; padding: 11px 16px; border-radius: 12px; color: var(--ink);
  font-size: 1rem; font-weight: 600;
}
.drawer-body > a:active { background: #f4f7fb; }
.drawer-sep { border-top: 1px solid var(--line); margin: 18px 8px; }

/* ---------- Buttons (rounded pills, flat fills, no shadows) ---------- */
.btn {
  display: inline-block;
  border: 1px solid var(--navy);
  background: var(--navy);
  color: #fff;
  padding: 13px 24px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 999px;
  text-align: center;
  line-height: 1.1;
}
.btn:active { background: var(--navy-d); border-color: var(--navy-d); }
.btn-ghost {
  background: transparent; color: var(--navy); border: 1px solid var(--navy);
}
.btn-block { display: block; width: 100%; }
.btn-lg { padding: 16px 28px; font-size: 1.05rem; }

/* ---------- Forms ---------- */
label { display: block; font-size: .9rem; font-weight: 600; margin: 0 0 6px; }
input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--orange);
}
.field { margin-bottom: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* ---------- Panels / cards (rounded, soft fills, no borders) ---------- */
.panel {
  border: 0;
  border-radius: 24px;
  background: #f4f7fb;
  padding: 28px;
}
.panel-fill { background: #fff3e9; }
.section { padding: 56px 0; }
.section + .section { border-top: 1px solid var(--line); }

/* ---------- Hero (house photo under a navy overlay) ---------- */
.hero {
  padding: 64px 0;
  justify-content: center;
  background:
    linear-gradient(rgba(9, 35, 72, .82), rgba(9, 35, 72, .82)),
    url('/assets/img/hero-house.jpg') center / cover no-repeat;
  color: #fff;
  display: flex;
  align-items: center;
  min-height: 560px;
}
.hero > .container { width: 100%; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 { font-size: 2.6rem; color: #fff; }
.hero .muted { color: #b7c3d8; }
.hero ul li::marker { color: var(--orange); }
.hero .panel { background: #fff; color: var(--ink); border-color: #fff; }
.hero .panel .muted { color: var(--muted); }
.eyebrow {
  text-transform: uppercase; letter-spacing: .12em; font-size: .78rem;
  font-weight: 700; color: var(--orange); margin-bottom: 14px;
}

/* ---------- Homepage: Opendoor-style hero + question wizard ----------
   The homepage deliberately breaks the flat-square rule: light, airy,
   rounded pill search — the Opendoor look — while keeping the brand palette. */
.hero-od {
  position: relative;
  width: 100%; margin: 0;
  border-radius: 0 0 32px 32px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .97) 0%, rgba(255, 255, 255, .93) 46%, rgba(255, 255, 255, .45) 100%),
    url('/assets/img/hero-house.jpg') center / cover no-repeat;
  padding: 128px 0 204px; text-align: left;
}
/* Inner content stays on the same 1272px grid as every section below. */
.od-wrap { max-width: 1320px; margin: 0 auto; padding: 0 24px; }
.od-title { max-width: 700px; }
.geo-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border-radius: 999px; padding: 8px 18px;
  font-size: .88rem; font-weight: 600; color: var(--muted); margin: 0 0 18px;
}
.geo-badge svg { width: 16px; height: 16px; color: var(--orange); }
.state-illus { width: 100%; max-width: 440px; display: block; margin: 0 auto; }
.geo-badge strong { color: var(--navy); }
.od-title {
  font-size: 3.3rem; line-height: 1.08; letter-spacing: -0.02em;
  color: var(--navy); margin: 0 0 18px;
}
.od-sub { font-size: 1.2rem; color: var(--muted); max-width: 560px; margin: 0 0 34px; }
.od-pill {
  position: relative;
  display: flex; align-items: center; max-width: 620px; margin: 0;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 6px 6px 22px;
  box-shadow: 0 12px 32px rgba(9, 35, 72, .10);
}
.od-pin { color: var(--muted); margin-right: 10px; display: flex; }
.od-pin svg { width: 22px; height: 22px; }
.od-pill .ac-wrap { flex: 1; min-width: 0; display: flex; position: static; }
.od-pill input {
  flex: 1; width: 100%; min-width: 0; border: 0; font-size: 1.08rem; padding: 14px 8px;
  background: transparent;
}
.od-pill input:focus { outline: none; }
.od-pill .ac-list {
  /* anchored to the PILL, not the inner input — full width, aligned edges */
  left: 0; right: 0; top: calc(100% + 10px);
  text-align: left; border-radius: 18px;
  border: 1px solid var(--line); overflow: hidden;
  box-shadow: 0 12px 32px rgba(9, 35, 72, .12);
}
.od-pill .ac-item { padding: 13px 22px; }
.od-cta {
  background: var(--orange); border-color: var(--orange);
  border-radius: 999px; font-weight: 800; padding: 14px 28px; white-space: nowrap;
}
.od-cta-ico { display: none; width: 22px; height: 22px; }
.od-cta:active { background: var(--orange-d); border-color: var(--orange-d); }
.od-err { color: var(--red); }
.od-note { color: var(--muted); font-size: .9rem; margin: 14px 0 0; }

/* --- Wizard (Opendoor question flow: soft corners, light, roomy) --- */
.werr { color: var(--red); font-size: .88rem; margin: 8px 0 0; text-align: left; }
.wizard-section { border-bottom: 1px solid var(--line); }
.wiz-progress { margin-bottom: 32px; }
.wiz-progress-label {
  display: flex; justify-content: space-between; gap: 12px;
  font-weight: 700; font-size: .9rem; margin-bottom: 8px;
}
.wiz-progress-label .muted { font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wiz-track { height: 6px; background: var(--panel); border-radius: 999px; overflow: hidden; }
.wiz-fill { height: 100%; background: var(--orange); transition: width .25s; }
.wiz-q { display: block; font-weight: 700; margin: 0 0 10px; font-size: 1rem; }

.opt-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.opt-grid-1 { grid-template-columns: 1fr; }
.opt-card {
  border: 1px solid var(--line); border-radius: 14px; background: var(--bg);
  color: var(--ink); padding: 16px 14px; font-size: .98rem; font-weight: 700;
  cursor: pointer; text-align: center; font-family: inherit;
}
.opt-grid-1 .opt-card { text-align: left; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.opt-card .opt-ico { display: block; margin: 0 auto 8px; width: 30px; height: 30px; color: var(--navy); }
.opt-card .opt-ico svg { width: 30px; height: 30px; display: block; }
.opt-card.active .opt-ico { color: var(--orange); }
.opt-card .opt-sub { display: block; font-weight: 400; color: var(--muted); font-size: .85rem; margin-top: 4px; }
.opt-grid-1 .opt-card .opt-sub { margin-top: 0; }
.opt-card.active {
  border: 2px solid var(--orange); background: #fff7f0; padding: 15px 13px;
}
/* Photo option cards: full-bleed image on top, left-aligned text with real
   breathing room below — labels must never touch the card edges. */
.opt-photo { padding: 0 14px 14px !important; overflow: hidden; text-align: left; }
.opt-photo img {
  width: calc(100% + 28px); aspect-ratio: 3 / 2; object-fit: cover; display: block;
  margin: 0 -14px 10px; border-radius: 13px 13px 0 0;
}
.opt-photo .opt-sub { margin-top: 3px; line-height: 1.35; }
.opt-photo.active { padding: 0 13px 13px !important; }
.opt-photo.active img { width: calc(100% + 26px); margin: 0 -13px 10px; border-radius: 11px 11px 0 0; }
.opt-grid-3 { grid-template-columns: repeat(3, 1fr); }
.opt-grid-5 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 820px) { .opt-grid-3, .opt-grid-5 { grid-template-columns: repeat(2, 1fr); } }

.opt-compact .opt-card { padding: 12px 14px; }
.opt-compact .opt-card.active { padding: 11px 13px; }

.stepper { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.stepper input { border: 0; text-align: center; font-size: 1.15rem; font-weight: 700; width: 100%; }
.stepper input:focus { outline: none; }
.st-btn {
  width: 52px; flex: none; border: 0; background: var(--panel); color: var(--ink);
  font-size: 1.3rem; font-weight: 700; cursor: pointer;
}
.st-btn:active { background: var(--line); }
.wizard-section input, .wizard-section .review-panel { border-radius: 14px; }
.wizard-section .btn { border-radius: 999px; }

.wiz-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.wiz-nav .od-cta, .wiz-nav .btn-cta { margin-left: auto; padding: 14px 34px; }
.btn-cta {
  background: var(--orange); border-color: var(--orange); font-weight: 800; white-space: nowrap;
}
.btn-cta:active { background: var(--orange-d); border-color: var(--orange-d); }
.review-panel { padding: 20px 24px; background: #fff; border: 1px solid var(--line); }
.rev-row {
  display: flex; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line);
  font-size: .95rem;
}
.rev-row:last-child { border-bottom: 0; }
.rev-k { flex: 0 0 130px; color: var(--muted); font-weight: 700; }

/* Rounded inset info sections — Opendoor/Google style: soft fills,
   generous radii, no borders, no shadows, alternating layouts. */
.od-section {
  width: calc(100% - 48px); max-width: 1272px; margin: 48px auto;
  border-radius: 32px; padding: 64px; text-align: left;
}
.od-section h2 { margin-top: 0; font-size: 2rem; letter-spacing: -0.01em; }
.od-open { max-width: 1272px; width: calc(100% - 48px); margin: 48px auto; padding: 0; text-align: left; }
.od-open h2 { font-size: 2rem; letter-spacing: -0.01em; }
.od-navy { background: var(--navy); color: #fff; }
.od-navy h2 { color: #fff; }
.od-tint-orange { background: #fff3e9; }
/* Stats card that breaks out of the hero — white like the search pill,
   the one place a soft shadow is allowed so it reads as floating ON the photo. */
.od-overlap {
  position: relative; z-index: 2; max-width: 1272px;
  margin: -76px auto 48px; padding: 34px 48px;
  background: #fff; box-shadow: 0 16px 40px rgba(9, 35, 72, .12);
}
.od-overlap .band-row > div { border-left: 1px solid var(--line); padding-left: 28px; }
.od-overlap .band-row > div:first-child { border-left: 0; padding-left: 0; }
.od-overlap .band-l { color: var(--muted); }
.od-overlap .band-n { color: var(--navy); }
.od-overlap .band-n:first-line { color: var(--navy); }
.od-tint-blue { background: #f2f6fc; }
.od-lede { font-size: 1.1rem; max-width: 560px; }

.od-split { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.od-illus svg { width: 100%; max-width: 400px; height: auto; display: block; margin: 0 auto; }

.od-feature { display: flex; gap: 16px; align-items: flex-start; margin-top: 22px; max-width: 520px; }
.od-fico {
  flex: none; width: 46px; height: 46px; border-radius: 14px; background: #fff;
  display: flex; align-items: center; justify-content: center; color: var(--orange);
}
.od-fico svg { width: 22px; height: 22px; }

.od-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 30px; }
.od-col { border-radius: 24px; padding: 32px; }
.od-col h3 { margin-top: 0; }
.od-col ul { list-style: none; padding: 0; margin: 16px 0 0; }
.od-col li { padding: 8px 0; display: flex; gap: 12px; align-items: flex-start; }
.od-col-us { background: #eef7f1; }
.od-col-them { background: #f2f5f9; color: var(--muted); }
.chip {
  flex: none; width: 24px; height: 24px; border-radius: 999px; font-size: .8rem;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 800;
  margin-top: 1px;
}
.chip-y { background: #1d6b4c; color: #fff; }
.chip-n { background: #e9d5d6; color: var(--red); }

.hiw-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 34px; }
.hiw-step { position: relative; background: #f2f6fc; border-radius: 24px; padding: 30px 28px; }
.hiw-ico {
  width: 60px; height: 60px; border-radius: 18px; background: #fff3e9;
  display: flex; align-items: center; justify-content: center; color: var(--orange);
  margin-bottom: 18px;
}
.hiw-ico svg { width: 28px; height: 28px; }
.hiw-num {
  position: absolute; top: 26px; right: 26px; width: 32px; height: 32px;
  border-radius: 999px; background: var(--navy); color: #fff; font-weight: 800;
  display: flex; align-items: center; justify-content: center; font-size: .9rem;
}
.hiw-step h3 { margin: 0 0 8px; }

.od-faq { margin-top: 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.od-faq-col { display: flex; flex-direction: column; gap: 14px; }
.od-faq details {
  background: #f2f6fc; border-radius: 18px; padding: 20px 26px;
}
.od-faq summary { font-weight: 700; cursor: pointer; font-size: 1.02rem; list-style: none; position: relative; padding-right: 34px; }
.od-faq summary::-webkit-details-marker { display: none; }
.od-faq summary::after {
  content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  font-size: 1.4rem; font-weight: 400; color: var(--orange);
}
.od-faq summary::after { transition: transform .25s ease; }
.od-faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.od-faq details p {
  margin: 0; max-width: 700px; overflow: hidden;
  transition: max-height .28s ease, opacity .28s ease, padding-top .28s ease;
  padding-top: 12px;
}

.od-cta-final .od-cta { margin-top: 8px; }
.band-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: left; }
.band-n { font-size: 1.7rem; font-weight: 800; color: var(--orange); }
.band-l { color: #b7c3d8; font-size: .9rem; }

.steps .step { border-radius: 24px; }

@media (max-width: 820px) {
  .od-title { font-size: 2.2rem; }
  .hero-od {
    width: 100%; padding: 64px 0 100px; border-radius: 0 0 22px 22px;
    background:
      linear-gradient(rgba(255, 255, 255, .95), rgba(255, 255, 255, .86)),
      url('/assets/img/hero-house.jpg') center / cover no-repeat;
  }
  .od-wrap { padding: 0 16px; }
  .od-section, .od-open { margin-top: 32px; margin-bottom: 32px; }
  .od-section { width: calc(100% - 32px); padding: 36px 22px; border-radius: 22px; }
  .od-open { width: calc(100% - 32px); padding: 0; }
  .od-overlap { margin-top: -36px; margin-bottom: 32px; padding: 24px 22px; }
  .od-overlap .band-row > div { border-left: 0; padding-left: 0; }
  .od-faq { grid-template-columns: 1fr; }
  .pipeline { grid-template-columns: repeat(2, 1fr); }
  .od-compare, .hiw-grid, .od-split { grid-template-columns: 1fr; }
  /* below tablet: drawer takes over from the inline nav (public pages only) */
  .nav-desktop { display: none; }
  .hamburger { display: flex; }
  /* Stacked splits read as text-then-orphaned-graphic — drop the
     illustrations entirely on small screens, they earn nothing there. */
  .od-split { gap: 0; }
  .od-split .od-illus { display: none; }

  .od-pill { border-radius: 999px; padding: 5px 5px 5px 16px; }
  .od-pin { display: none; }
  .od-pill input { padding: 12px 6px; font-size: 1rem; }
  .od-pill .od-cta { flex: none; width: 48px; height: 48px; padding: 0;
    display: flex; align-items: center; justify-content: center; }
  .od-pill .od-cta-text { display: none; }
  .od-pill .od-cta-ico { display: block; }
  .opt-grid { grid-template-columns: repeat(2, 1fr); }
  .band-row { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Offer result ---------- */
.offer-range {
  border: 0;
  border-radius: 24px;
  padding: 28px;
  background: #fff3e9;
}
/* ---------- Address autocomplete (flat, square) ---------- */
.ac-wrap { position: relative; }
.ac-list {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 50;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  max-height: 260px; overflow-y: auto; overflow-x: hidden;
}
.ac-item { padding: 11px 14px; cursor: pointer; font-size: .95rem; color: var(--ink); }
.ac-item.active, .ac-item:hover { background: var(--panel); }
.ac-item.ac-wait { color: var(--muted); cursor: default; font-size: .88rem; }

/* Say-yes verdict chip on deal cards */
.score-chip {
  display: inline-block; border-radius: 999px; padding: 2px 12px;
  font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .03em;
}
.score-strong { background: #1d6b4c; color: #fff; }
.score-ok { background: var(--orange); color: #fff; }
.score-low { background: #8b99b0; color: #fff; }

/* Comps drawer inside a deal card */
.deal-comps { padding: 10px 20px; border-bottom: 1px solid var(--line); }
.deal-comps summary { cursor: pointer; font-size: .85rem; font-weight: 700; color: var(--navy); }
.deal-comps .table { background: #fff; border-radius: 12px; overflow: hidden; }

/* ---------- Guided photo walkthrough (in-page camera) ---------- */
.pw-stage {
  position: relative; border-radius: 24px; overflow: hidden; background: #0a0f1a;
  aspect-ratio: 3 / 4; max-height: 62vh;
}
.pw-stage video { width: 100%; height: 100%; object-fit: cover; display: block; }
.pw-overlay {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 18px 16px;
  background: linear-gradient(transparent, rgba(9, 35, 72, .78)); color: #fff;
}
.pw-label { font-weight: 800; font-size: 1.05rem; }
.pw-tip { font-size: .85rem; color: #cfd9e8; margin-top: 2px; }
.pw-flash {
  position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none;
  transition: opacity .15s;
}
.pw-flash.on { opacity: .85; }
.pw-controls { display: flex; align-items: center; justify-content: center; gap: 22px; }
.pw-shutter {
  width: 74px; height: 74px; border-radius: 999px; border: 4px solid var(--navy);
  background: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center;
  padding: 0;
}
.pw-shutter span {
  width: 54px; height: 54px; border-radius: 999px; background: var(--orange); display: block;
}
.pw-shutter:active span { transform: scale(.9); }
.pw-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.pw-thumb {
  width: 72px; height: 72px; object-fit: cover; border-radius: 12px; display: block;
}

.photo-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.photo-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; display: block; }
@media (max-width: 820px) { .photo-grid { grid-template-columns: repeat(3, 1fr); } }

/* QR + photo ask on the thanks page */
.qr-box { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.qr-box img { width: 132px; height: 132px; border-radius: 12px; background: #fff; padding: 6px; }

/* Inline loading spinner (SVG-free, no emoji) */
.dot-spin {
  display: inline-block; width: 14px; height: 14px; vertical-align: -2px;
  border: 2.5px solid var(--line); border-top-color: var(--orange);
  border-radius: 999px; animation: kspin .7s linear infinite; margin-right: 6px;
}
.dot-spin.light { border-color: rgba(255, 255, 255, .35); border-top-color: #fff; }
@keyframes kspin { to { transform: rotate(360deg); } }

/* ---------- Pagination ---------- */
.pager { display: flex; align-items: center; gap: 16px; justify-content: center; flex-wrap: wrap; }
.pager .pager-btn { padding: 8px 20px; font-size: .9rem; }

/* Honeypot: invisible to humans, irresistible to bots */
.hp-field { position: absolute; left: -9999px; top: -9999px; height: 1px; overflow: hidden; }

/* ---------- Work queue tabs ---------- */
.work-tabs { display: flex; gap: 10px; flex-wrap: wrap; }
.work-tabs .tab {
  padding: 11px 24px; font-weight: 700; font-size: .95rem; color: var(--muted);
  text-decoration: none; border-radius: 999px; background: #f4f7fb;
}
.work-tabs .tab:hover { color: var(--ink); }
.work-tabs .tab.active { color: #fff; background: var(--navy); }
.work-tabs .tab .count {
  display: inline-block; margin-left: 8px; padding: 1px 9px; font-size: .8rem;
  border-radius: 999px; background: var(--orange); color: #fff;
}
.work-tabs .tab:not(.active) .count { background: var(--panel); color: var(--muted); }

/* ---------- Lead source badges (color = where it came from) ---------- */
.src-badge {
  display: inline-block; padding: 1px 8px; font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; color: #fff; vertical-align: 1px;
}
.src-zillow   { background: #006aff; }   /* Zillow blue */
.src-web      { background: var(--green); }
.src-campaign { background: var(--orange); }
.src-manual   { background: var(--navy); }
.src-other    { background: var(--muted); }
.src-email    { background: #7c3aed; }   /* outreach replies */

/* Email reply intents: solid chips, meaning at a glance */
.intent-chip {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: .72rem; font-weight: 700; color: #fff; margin-left: 6px;
  text-transform: uppercase; letter-spacing: .04em; vertical-align: 2px;
}
.intent-interested, .intent-wants_call { background: var(--green); }
.intent-question, .intent-maybe_later  { background: var(--orange); }
.intent-not_interested, .intent-wrong_person, .intent-unsubscribe { background: var(--muted); }
.intent-auto_reply, .intent-other { background: var(--navy); }
.intent-hot { background: var(--red); }

/* ---------- Work queue deal cards ---------- */
.deal-card { border: 0; border-radius: 24px; background: #f4f7fb; padding: 0; overflow: hidden; }
.deal-card.hot { background: #fff3e9; }
.deal-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  flex-wrap: wrap;
  padding: 14px 20px; border-bottom: 1px solid var(--line); background: var(--panel);
}
.deal-head .addr { font-weight: 700; font-size: 1.05rem; }
.deal-head .addr .muted { font-weight: 400; }
.deal-phone {
  font-weight: 800; font-size: 1.05rem; white-space: nowrap;
  color: var(--navy);
}
/* The money story, left to right: ask → guarantee → list → profit */
.deal-flow { display: grid; grid-template-columns: repeat(5, 1fr); border-bottom: 1px solid var(--line); }
.deal-flow .cell {
  padding: 14px 16px; border-right: 1px solid var(--line); position: relative;
}
.deal-flow .cell:last-child { border-right: 0; }
.deal-flow .lbl {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); margin-bottom: 2px;
}
.deal-flow .val { font-size: 1.15rem; font-weight: 800; letter-spacing: -.01em; }
.deal-flow .sub { font-size: .78rem; color: var(--muted); margin-top: 2px; }
.deal-flow .cell.profit { background: var(--panel); }
.deal-flow .cell.profit .val { color: var(--green); }
.deal-flow .cell:not(:last-child)::after {
  content: "→"; position: absolute; right: -7px; top: 50%; transform: translateY(-50%);
  background: var(--bg); color: var(--muted); font-size: .85rem; line-height: 1;
  padding: 2px 0; z-index: 1;
}
.deal-meta {
  display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center;
  padding: 10px 20px; border-bottom: 1px solid var(--line);
  font-size: .82rem; color: var(--muted);
}
.deal-body { padding: 16px 20px; }
.deal-actions {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  padding: 14px 20px; border-top: 1px solid var(--line); background: var(--panel);
}
@media (max-width: 820px) {
  .deal-flow { grid-template-columns: repeat(2, 1fr); }
  .deal-flow .cell:nth-child(2)::after { display: none; }
  .deal-flow .cell:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

/* Seller benefit list: flat orange square markers */
.checks { list-style: none; padding: 0; margin: 0 0 1rem; }
.checks li { padding-left: 22px; position: relative; margin-bottom: 10px; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: .45em;
  width: 10px; height: 10px; background: var(--orange);
}
.fact-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fact-chip {
  background: #f4f7fb; border-radius: 999px; padding: 5px 14px;
  font-size: .85rem; font-weight: 700; color: var(--navy);
}
.offer-track { display: flex; gap: 6px; flex-wrap: wrap; }
.ot-step {
  display: flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 700;
  color: var(--muted); background: #f4f7fb; border-radius: 999px; padding: 6px 16px 6px 8px;
}
.ot-dot {
  width: 22px; height: 22px; border-radius: 999px; background: #dfe8f4; color: var(--muted);
  display: flex; align-items: center; justify-content: center; font-size: .75rem;
}
.ot-step.done { color: var(--green); background: #eef7f1; }
.ot-step.done .ot-dot { background: var(--green); color: #fff; }
.ot-step.next { color: var(--navy); }
.ot-step.next .ot-dot { background: var(--navy); color: #fff; }

.flag-card { cursor: pointer; }
.flag-card input { display: none; }

.offer-option { border-radius: 24px; padding: 26px 28px; background: #f4f7fb; }
.offer-option-hi { background: #eef7f1; }
.offer-option .amount { font-size: 2.2rem; font-weight: 800; color: var(--navy); letter-spacing: -.02em; }
.opt-tag {
  display: inline-block; border-radius: 999px; background: var(--green); color: #fff;
  font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
  padding: 3px 12px; margin-bottom: 10px;
}
.opt-tag-alt { background: var(--navy); }
.pref-row { display: flex; gap: 10px; flex-wrap: wrap; }
.pref-pill {
  display: flex; align-items: center; gap: 8px; border-radius: 999px;
  background: #fff; padding: 10px 18px; font-weight: 700; font-size: .92rem;
  cursor: pointer; margin: 0;
}
.pref-pill input { width: auto; }

.offer-range .amount {
  font-size: 2.4rem; font-weight: 800; color: var(--navy); letter-spacing: -.02em;
}
.kv { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--muted); }
.kv .v { font-weight: 600; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.steps .step { padding: 28px; background: #f2f6fc; border-radius: 24px; }
.step .num {
  width: 34px; height: 34px; border-radius: 999px; background: var(--orange); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; margin-bottom: 14px;
}

/* ---------- Tables ---------- */
.table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
}
.table th, .table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: .92rem; }
.table th { background: var(--panel); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.table tr:last-child td { border-bottom: 0; }

/* ---------- Status badges (flat, square) ---------- */
.badge {
  display: inline-block; padding: 3px 11px; font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted); background: var(--panel);
}
.badge.new            { border-color: var(--navy);   color: var(--navy); }
.badge.under_contract { border-color: var(--orange); color: var(--orange-d); }
.badge.assigned       { border-color: var(--orange); color: var(--navy); background: var(--orange); }
.badge.dead           { border-color: var(--red);    color: var(--red); }

/* ---------- Pipeline summary strip ---------- */
.pipeline { display: grid; grid-template-columns: repeat(8, 1fr); gap: 10px; }
.pipeline .cell { padding: 16px; background: #f4f7fb; border-radius: 18px; text-align: center; }
.pipeline .cell .n { font-size: 1.6rem; font-weight: 800; }
.pipeline .cell .l { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }

/* ---------- Alerts ---------- */
.alert { border: 0; border-radius: 16px; background: #f4f7fb; padding: 14px 18px; margin-bottom: 24px; }
.alert-error { background: #faeeee; }
.alert-info { background: #f2f6fc; }
.alert-success { background: #eef7f1; }
.alert-error { border-color: var(--red); color: var(--red); }
.alert-info  { border-color: var(--navy); }
.alert-success { border-color: var(--green); color: var(--green); }

/* ---------- Contract document + e-signature ---------- */
.doc-header { border-bottom: 2px solid var(--navy); }
.contract-doc h2 { text-align: center; margin-bottom: 4px; }
.contract-doc .doc-sub { text-align: center; color: var(--muted); font-size: .9rem; margin-bottom: 28px; }
.contract-doc h3 { margin-top: 22px; font-size: 1rem; }
.contract-doc p { text-align: justify; }
.sig-blocks { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 44px; }
.sig-line { border-bottom: 1px solid var(--ink); height: 56px; }
.sig-line.signed-by-company {
  display: flex; align-items: flex-end; padding-bottom: 4px;
  font-family: "Segoe Script", "Bradley Hand", cursive; font-size: 1.3rem;
}
.sig-canvas {
  width: 100%; height: 160px; display: block; touch-action: none;
  border: 1px solid var(--line); background: var(--panel); cursor: crosshair;
}
.signed-stamp {
  margin-top: 32px; padding-top: 16px; border-top: 2px solid var(--green);
}
@media (max-width: 560px) { .sig-blocks { grid-template-columns: 1fr; } }
@media print {
  .no-print, .site-header, .site-footer, .nav { display: none !important; }
  .panel { border: 0; padding: 0 !important; }
  body { font-size: 13px; }
}

/* ---------- Admin shell ---------- */
.admin-header { border-bottom: 1px solid var(--line); background: var(--navy); }
.admin-header .bar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; min-height: 60px; padding-top: 8px; padding-bottom: 8px; flex-wrap: wrap;
}
.admin-header .brand, .admin-header .nav a { color: #fff; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0; color: var(--muted); font-size: .9rem; }

/* ---------- Utilities ---------- */
.card-s { max-width: 460px; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.text-center { text-align: center; }
.row { display: flex; gap: 16px; align-items: center; }
.row-between { display: flex; justify-content: space-between; align-items: center; }

/* ---------- Responsive ----------
   Tablet stacks the two-column layouts; phone tightens spacing, shrinks the
   oversized display type, and keeps wide admin tables scrollable instead of
   letting them blow out the page width. */

@media (max-width: 820px) {
  .hero-grid, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .pipeline { grid-template-columns: repeat(4, 1fr) !important; }
  .nav { gap: 16px; }
  .table { display: block; overflow-x: auto; white-space: nowrap; }
  /* Long addresses wrap into two short lines instead of one huge column. */
  .table .cell-addr { white-space: normal; min-width: 150px; max-width: 220px; font-size: .85rem; }
  input, select, textarea { max-width: 100%; }

  /* Admin nav: 8 sections don't fit a phone header — swipe them instead of
     stacking into a wall. Brand on its own row, links in a scroll strip. */
  .admin-header .bar { padding-bottom: 0; }
  .admin-header .nav {
    flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start;
    width: 100%; order: 3; padding: 2px 0 10px;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .admin-header .nav::-webkit-scrollbar { display: none; }
  .admin-header .nav span { display: none; }
  .hero { min-height: 0; padding: 48px 0; }
  .hero h1 { font-size: 2rem; }
  .hero .panel { margin-bottom: 0; }
}

@media (max-width: 560px) {
  .container { padding: 0 16px; }
  .brand-logo { height: 26px; }

  /* Hero: the headline and offer figures are the things that overflow.
     Bias the crop upward so the house, not the lawn, sits behind the text. */
  .hero {
    padding: 36px 0;
    background-position: center 35%, center 35%;
  }
  .hero h1 { font-size: 1.6rem; }
  .hero-grid { gap: 28px; }
  h1 { font-size: 1.7rem; }
  h2 { font-size: 1.35rem; }
  .section { padding: 36px 0; }
  .panel { padding: 20px; }

  /* Homepage on small phones: strong hierarchy — big title, quiet support
     text — and long copy trimmed away entirely (.m-hide). */
  .m-hide { display: none !important; }
  .od-title { font-size: 2.15rem; line-height: 1.08; }
  .od-sub { font-size: 1rem; margin-bottom: 24px; }
  .od-note { font-size: .82rem; }
  .od-section h2, .od-open h2 { font-size: 1.5rem; }
  .od-lede { font-size: .96rem; }
  .od-feature { margin-top: 16px; }
  .od-feature strong { font-size: .98rem; }
  .od-feature .muted { font-size: .88rem; }
  .od-fico { width: 40px; height: 40px; border-radius: 12px; }
  .od-fico svg { width: 19px; height: 19px; }
  .band-n { font-size: 1.45rem; }
  .band-l { font-size: .8rem; }

  .od-col, .hiw-step { padding: 22px 18px; }
  .od-col li, .hiw-step p { font-size: .92rem; }
  .hiw-step h3, .od-col h3 { font-size: 1.05rem; }
  .od-faq details { padding: 15px 17px; }
  .od-faq summary { font-size: .95rem; }
  .od-faq details p { font-size: .92rem; }
  .od-illus svg { max-width: 220px; }
  /* Final CTA on phones: no illustration filling navy space, one full-width button */
  .od-cta-final .od-illus { display: none; }
  .od-cta-final .od-split { gap: 0; }
  .od-cta-final .od-cta { width: 100%; margin-top: 4px; }
  .wiz-q { font-size: .95rem; }
  .opt-card { font-size: .9rem; }
  .opt-card .opt-sub { font-size: .78rem; }
  .rev-row { flex-wrap: wrap; }
  .rev-k { flex-basis: 100%; }
  .wiz-nav .btn { padding: 12px 22px; }

  /* Offer + thanks + photo pages on small phones */
  .offer-option .amount { font-size: 1.7rem; }
  .offer-option { padding: 20px; }
  .fact-chip { font-size: .78rem; padding: 4px 11px; }
  .ot-step { font-size: .76rem; padding: 5px 12px 5px 6px; }
  .ot-dot { width: 19px; height: 19px; font-size: .68rem; }
  .qr-box img { width: 108px; height: 108px; }
  .pw-shutter { width: 66px; height: 66px; }
  .pw-shutter span { width: 48px; height: 48px; }
  .pw-thumb { width: 60px; height: 60px; }

  /* "$431,000 – $477,000" is too wide for a phone at 2.4rem. */
  .offer-range { padding: 20px; }
  .fact-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fact-chip {
  background: #f4f7fb; border-radius: 999px; padding: 5px 14px;
  font-size: .85rem; font-weight: 700; color: var(--navy);
}
.offer-track { display: flex; gap: 6px; flex-wrap: wrap; }
.ot-step {
  display: flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 700;
  color: var(--muted); background: #f4f7fb; border-radius: 999px; padding: 6px 16px 6px 8px;
}
.ot-dot {
  width: 22px; height: 22px; border-radius: 999px; background: #dfe8f4; color: var(--muted);
  display: flex; align-items: center; justify-content: center; font-size: .75rem;
}
.ot-step.done { color: var(--green); background: #eef7f1; }
.ot-step.done .ot-dot { background: var(--green); color: #fff; }
.ot-step.next { color: var(--navy); }
.ot-step.next .ot-dot { background: var(--navy); color: #fff; }

.flag-card { cursor: pointer; }
.flag-card input { display: none; }

.offer-option { border-radius: 24px; padding: 26px 28px; background: #f4f7fb; }
.offer-option-hi { background: #eef7f1; }
.offer-option .amount { font-size: 2.2rem; font-weight: 800; color: var(--navy); letter-spacing: -.02em; }
.opt-tag {
  display: inline-block; border-radius: 999px; background: var(--green); color: #fff;
  font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
  padding: 3px 12px; margin-bottom: 10px;
}
.opt-tag-alt { background: var(--navy); }
.pref-row { display: flex; gap: 10px; flex-wrap: wrap; }
.pref-pill {
  display: flex; align-items: center; gap: 8px; border-radius: 999px;
  background: #fff; padding: 10px 18px; font-weight: 700; font-size: .92rem;
  cursor: pointer; margin: 0;
}
.pref-pill input { width: auto; }

.offer-range .amount { font-size: 1.55rem; letter-spacing: -.01em; }

  /* Beds / baths / sqft stay side by side — they're tiny numeric fields and
     stacking them makes the form feel endless. */

  /* 16px keeps iOS from zooming the page on focus. */
  input, select, textarea { font-size: 16px; }
  .btn { padding: 14px 20px; }          /* comfortable tap target */
  .btn-lg { padding: 16px 22px; font-size: 1rem; }

  /* Key/value rows read better stacked than squeezed. */
  .kv { flex-direction: column; align-items: flex-start; gap: 2px; }
  .kv .v { font-weight: 700; }

  .row-between { flex-direction: column; align-items: flex-start; gap: 8px; }
  .row { flex-wrap: wrap; }

  /* Admin tables: scroll the table, don't stretch the page. */
  .table { display: block; overflow-x: auto; white-space: nowrap; }
  .pipeline { grid-template-columns: repeat(2, 1fr) !important; }
  .pipeline .cell { border-right: 0; border-bottom: 1px solid var(--line); }

  .site-footer { padding: 24px 0; }
}
