/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--nav-w) 1fr; min-height: 100vh; }

.nav {
  background: var(--ink);
  color: #fff;
  padding: 26px 16px 20px;
  display: flex; flex-direction: column; gap: 26px;
  position: sticky; top: 0; height: 100vh;
}
.brand { padding: 0 10px; }
.brand-name { font-family: var(--font-display); font-size: 26px; font-style: italic; color: #fff; line-height: 1; }
.brand-sub { font-size: 9.5px; letter-spacing: .28em; text-transform: uppercase; color: #9C8F95; margin-top: 7px; }

.nav-links { display: flex; flex-direction: column; gap: 3px; }
.nav-link {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: var(--r);
  font-size: 14px; font-weight: 500; color: #B9AFB4;
  transition: all .16s var(--ease);
}
.nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-link.active { background: var(--mauve); color: #fff; font-weight: 600; }
.nav-link .ico { width: 18px; height: 18px; flex: none; opacity: .9; }
.nav-badge {
  margin-left: auto; background: rgba(255,255,255,.16);
  padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 700;
}
.nav-link.active .nav-badge { background: rgba(0,0,0,.22); }

.nav-foot { margin-top: auto; border-top: 1px solid rgba(255,255,255,.1); padding-top: 16px; }
.nav-agent { display: flex; align-items: center; gap: 11px; padding: 4px 10px; }
.nav-agent-name { font-size: 13.5px; font-weight: 600; color: #fff; }
.nav-agent-role { font-size: 11px; color: #9C8F95; }

.main { padding: 34px 40px 80px; max-width: 1080px; }

/* ---------- page header ---------- */
.page-head { margin-bottom: 28px; }
.page-title { font-size: 30px; font-weight: 600; letter-spacing: -0.02em; }
.page-title .accent { font-family: var(--font-display); font-style: italic; font-weight: 500; color: var(--mauve-deep); }
.page-sub { color: var(--text-muted); margin-top: 6px; font-size: 15px; }

/* ---------- progress tracker ---------- */
.tracker { display: flex; gap: 0; margin: 4px 0 8px; }
.step { flex: 1; position: relative; padding-top: 26px; }
.step::before {
  content: ''; position: absolute; top: 8px; left: 0; right: 0; height: 3px;
  background: var(--line); 
}
.step:first-child::before { left: 50%; border-radius: 999px 0 0 999px; }
.step:last-child::before  { right: 50%; border-radius: 0 999px 999px 0; }
.step.done::before, .step.current::before { background: var(--mauve); }
.step.current:last-child::before { background: var(--mauve); }
.step .dot {
  position: absolute; top: 2px; left: calc(50% - 7px);
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--cream); border: 3px solid var(--line);
  transition: all .2s var(--ease);
}
.step.done .dot { background: var(--mauve); border-color: var(--mauve); }
.step.current .dot {
  background: #fff; border-color: var(--mauve);
  box-shadow: 0 0 0 5px var(--blush-pale);
  width: 17px; height: 17px; top: 1px; left: calc(50% - 8px);
}
.step-label {
  text-align: center; font-size: 12.5px; font-weight: 600; color: var(--text-faint);
  padding: 0 4px;
}
.step.done .step-label { color: var(--text-muted); }
.step.current .step-label { color: var(--mauve-dark); }

/* ---------- home ---------- */
.hero { padding: 30px 32px; margin-bottom: 22px; background:
  linear-gradient(135deg, var(--blush-wash) 0%, #fff 55%); }
.hero-greet { font-family: var(--font-display); font-style: italic; font-size: 34px; color: var(--ink); line-height: 1.1; }
.hero-note { color: var(--text-muted); margin-top: 10px; max-width: 52ch; }

.next-card {
  display: flex; gap: 18px; align-items: flex-start;
  padding: 20px 22px; background: var(--blush-wash);
  border: 1px solid var(--blush); border-radius: var(--r-lg);
  margin-top: 22px;
}
.next-icon {
  width: 44px; height: 44px; flex: none; border-radius: 50%;
  background: var(--mauve); color: #fff;
  display: grid; place-items: center;
}

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px,1fr)); gap: 14px; margin-top: 22px; }
.tile { padding: 18px 20px; }
.tile-n { font-size: 27px; font-weight: 600; letter-spacing: -0.02em; margin-top: 4px; }
.tile-sub { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }

/* ---------- listing cards ---------- */
.homes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(272px,1fr)); gap: 20px; }
.home-card { overflow: hidden; display: flex; flex-direction: column; transition: all .2s var(--ease); }
.home-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

.home-photo { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--cream-deep); }
.home-photo img { width: 100%; height: 100%; object-fit: cover; }
.home-photo .ph { width: 100%; height: 100%; display: grid; place-items: center; }
.home-photo .ph svg { width: 46px; height: 46px; opacity: .32; }
.photo-count {
  position: absolute; left: 10px; bottom: 10px;
  background: rgba(23,21,26,.72); color: #fff; backdrop-filter: blur(6px);
  padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
}
.heart-btn {
  position: absolute; right: 10px; top: 10px;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.92); backdrop-filter: blur(6px);
  display: grid; place-items: center;
  box-shadow: var(--shadow-sm); transition: all .18s var(--ease);
}
.heart-btn:hover { transform: scale(1.08); }
.heart-btn svg { width: 18px; height: 18px; fill: none; stroke: var(--mauve-deep); stroke-width: 2; }
.heart-btn.on svg { fill: var(--mauve); stroke: var(--mauve); }
.heart-btn.on { background: #fff; }

.home-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.home-price { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.home-addr { font-size: 14px; font-weight: 500; }
.home-city { font-size: 13px; color: var(--text-muted); }
.home-facts { display: flex; gap: 8px; font-size: 12.5px; color: var(--text-muted); flex-wrap: wrap; }
.home-facts span::after { content: '·'; margin-left: 8px; color: var(--text-faint); }
.home-facts span:last-child::after { content: ''; }

.agent-note {
  background: var(--blush-wash); border-left: 3px solid var(--mauve);
  padding: 10px 12px; border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: 13px; line-height: 1.5; color: var(--ink-soft);
}
.agent-note .who { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--mauve-deep); display: block; margin-bottom: 3px; }

.home-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 4px; }
.react-btn {
  flex: 1; padding: 9px; border-radius: var(--r); font-size: 13px; font-weight: 600;
  border: 1px solid var(--line); color: var(--text-muted);
  transition: all .16s var(--ease);
}
.react-btn:hover { border-color: var(--mauve); color: var(--mauve-deep); background: var(--blush-wash); }
.react-btn.on-fav  { background: var(--mauve); border-color: var(--mauve); color: #fff; }
.react-btn.on-pass { background: #EDE9EA; border-color: #E0DADC; color: var(--text-muted); }

.stamp { font-size: 11.5px; color: var(--text-faint); }

/* ---------- documents ---------- */
.doc-list { display: flex; flex-direction: column; gap: 10px; }
.doc-row {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 20px; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  transition: all .16s var(--ease);
}
.doc-row:hover { border-color: var(--blush); box-shadow: var(--shadow-sm); }
.doc-icon {
  width: 40px; height: 40px; flex: none; border-radius: var(--r);
  display: grid; place-items: center; background: var(--blush-pale);
}
.doc-icon svg { width: 19px; height: 19px; stroke: var(--mauve-deep); fill: none; stroke-width: 1.7; }
.doc-icon.pending { background: var(--amber-pale); }
.doc-icon.pending svg { stroke: #976B2E; }
.doc-name { font-weight: 600; font-size: 14.5px; }
.doc-meta { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.doc-note { font-size: 13px; color: var(--text-muted); margin-top: 6px; line-height: 1.5; }

/* ---------- empty ---------- */
.empty { text-align: center; padding: 60px 24px; }
.empty-mark { width: 56px; height: 56px; margin: 0 auto 18px; border-radius: 50%;
  background: var(--blush-pale); display: grid; place-items: center; }
.empty-mark svg { width: 24px; height: 24px; stroke: var(--mauve); fill: none; stroke-width: 1.6; }
.empty h3 { font-size: 18px; margin-bottom: 7px; }
.empty p { color: var(--text-muted); max-width: 40ch; margin: 0 auto; font-size: 14.5px; }

/* ---------- agent card ---------- */
.agent-hero { display: flex; gap: 22px; align-items: center; padding: 26px 28px; }
.agent-avatar {
  width: 76px; height: 76px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, var(--blush) , var(--mauve));
  display: grid; place-items: center;
  font-family: var(--font-display); font-size: 28px; color: #fff; font-style: italic;
}
.contact-rows { display: flex; flex-direction: column; gap: 2px; margin-top: 18px; }
.contact-row { display: flex; align-items: center; gap: 13px; padding: 13px 4px; border-bottom: 1px solid var(--line-soft); }
.contact-row:last-child { border-bottom: 0; }
.contact-row svg { width: 17px; height: 17px; stroke: var(--mauve); fill: none; stroke-width: 1.7; flex: none; }

/* ---------- section head ---------- */
.sec-head { display: flex; align-items: baseline; justify-content: space-between; margin: 30px 0 14px; }
.sec-head h2 { font-size: 18px; }

/* ---------- mobile ---------- */
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .nav {
    position: fixed; bottom: 0; top: auto; height: auto; width: 100%;
    flex-direction: row; padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
    gap: 0; z-index: 40; border-top: 1px solid rgba(255,255,255,.08);
  }
  .brand, .nav-foot { display: none; }
  .nav-links { flex-direction: row; width: 100%; gap: 0; }
  .nav-link { flex-direction: column; gap: 4px; flex: 1; padding: 7px 2px; font-size: 10.5px; border-radius: var(--r-sm); }
  .nav-link.active { background: transparent; color: var(--mauve); }
  .nav-link .ico { width: 21px; height: 21px; }
  .nav-badge { position: absolute; top: 2px; right: 22%; }
  .main { padding: 22px 18px 96px; }
  .page-title { font-size: 25px; }
  .hero { padding: 24px 22px; }
  .hero-greet { font-size: 28px; }
  .step-label { font-size: 10px; }
  .homes-grid { grid-template-columns: 1fr; }
}

/* ---------- messaging ---------- */
.thread {
  display: flex; flex-direction: column; gap: 10px;
  padding: 20px 4px; overflow-y: auto; flex: 1; min-height: 0;
}
.msg { display: flex; flex-direction: column; max-width: 78%; }
.msg.mine   { align-self: flex-end; align-items: flex-end; }
.msg.theirs { align-self: flex-start; align-items: flex-start; }
.bubble {
  padding: 11px 15px; border-radius: var(--r-lg);
  font-size: 14.5px; line-height: 1.5; white-space: pre-wrap; word-break: break-word;
}
.msg.mine .bubble   { background: var(--mauve); color: #fff; border-bottom-right-radius: 6px; }
.msg.theirs .bubble { background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg-meta { font-size: 11px; color: var(--text-faint); margin: 4px 6px 0; }

.msg-day { text-align: center; margin: 14px 0 6px; }
.msg-day span {
  font-size: 11px; font-weight: 600; letter-spacing: .05em;
  color: var(--text-faint); background: var(--cream-deep);
  padding: 4px 12px; border-radius: 999px;
}

.composer {
  display: flex; gap: 10px; align-items: flex-end;
  padding: 14px 4px calc(4px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); background: var(--cream);
  position: sticky; bottom: 0;
}
.composer textarea {
  flex: 1; resize: none; padding: 11px 16px;
  border: 1px solid var(--line); border-radius: var(--r-xl);
  background: #fff; font-family: inherit; font-size: 14.5px; line-height: 1.45;
  max-height: 132px; transition: border-color .15s var(--ease);
}
.composer textarea:focus { outline: none; border-color: var(--mauve); box-shadow: 0 0 0 3px var(--blush-pale); }
.send-btn {
  width: 42px; height: 42px; flex: none; border-radius: 50%;
  background: var(--ink); color: #fff; display: grid; place-items: center;
  transition: all .16s var(--ease);
}
.send-btn:hover { background: var(--mauve-deep); transform: scale(1.05); }
.send-btn svg { width: 19px; height: 19px; }

.msg-page { display: flex; flex-direction: column; height: calc(100vh - 120px); }

/* inbox rows */
.inbox-row {
  display: flex; align-items: center; gap: 14px;
  padding: 15px 18px; border-bottom: 1px solid var(--line-soft);
  transition: background .13s var(--ease); cursor: pointer;
}
.inbox-row:last-child { border-bottom: 0; }
.inbox-row:hover { background: var(--blush-wash); }
.inbox-row.unread { background: var(--blush-wash); }
.inbox-preview {
  font-size: 13.5px; color: var(--text-muted); margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.inbox-row.unread .inbox-preview { color: var(--text); font-weight: 500; }
.unread-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--mauve); flex: none; }

.listing-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--mauve-deep);
  padding: 2px 0;
}
.listing-link:hover { color: var(--mauve-dark); text-decoration: underline; }
.listing-link svg { width: 13px; height: 13px; }

/* ---------- mobile bar (portal) ---------- */
.mobile-bar { display: none; }
.menu-btn { display: none; }
.nav-scrim { display: none; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }

  .mobile-bar {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px; background: var(--cream);
    border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 30;
  }
  .mobile-brand { font-family: var(--font-display); font-style: italic; font-size: 19px; }
  .menu-btn {
    display: grid; place-items: center; width: 40px; height: 40px;
    border-radius: var(--r); color: var(--ink); flex: none;
  }
  .menu-btn svg { width: 22px; height: 22px; }

  .nav {
    position: fixed; inset: 0 auto 0 0; height: 100dvh; width: 262px;
    z-index: 70; transform: translateX(-100%);
    transition: transform .26s var(--ease);
    flex-direction: column; padding: 24px 16px 20px; gap: 24px; overflow-y: auto;
  }
  .nav.open { transform: translateX(0); box-shadow: 0 0 60px rgba(0,0,0,.4); }
  .brand, .nav-foot { display: revert; }
  .nav-links { flex-direction: column; width: auto; gap: 3px; }
  .nav-link { flex-direction: row; gap: 12px; flex: none; padding: 12px 14px; font-size: 15px; border-radius: var(--r); }
  .nav-link.active { background: var(--mauve); color: #fff; }
  .nav-badge { position: static; margin-left: auto; }

  .nav-scrim {
    display: block; position: fixed; inset: 0; z-index: 65;
    background: rgba(23,21,26,.44); backdrop-filter: blur(2px);
    opacity: 0; pointer-events: none; transition: opacity .26s var(--ease);
  }
  .nav-scrim.open { opacity: 1; pointer-events: auto; }

  .main { padding: 20px 16px 44px; }
  .msg-page { height: calc(100dvh - 190px); }
}

/* Same guard on the portal — see agent.css for the reasoning. */
html, body { max-width: 100%; overflow-x: hidden; }

/* ⚠️ That overflow-x rule on BOTH html and body makes body its own scroll
   container, which is what quietly killed the nav's position: sticky — the
   sidebar scrolled away with the page on desktop. Fixed, not sticky, is
   immune; the grid's first column stays as its spacer. */
@media (min-width: 861px) {
  .nav { position: fixed; inset: 0 auto 0 0; width: var(--nav-w); height: 100dvh; overflow-y: auto; }
  /* ⚠️ …except a fixed element leaves the grid flow entirely, so it does NOT
     hold the first column. Without this the content div auto-placed into
     column 1 and rendered at nav width, behind the nav — the whole portal was
     a blank page on any desktop screen. Pin the content to column 2 so the
     first track really is the spacer the rule above assumes. (2026-09-20) */
  .shell > :not(.nav) { grid-column: 2; }
}
.shell > * { min-width: 0; }
.homes-grid > *, .tiles > * { min-width: 0; }
.msg .bubble { max-width: 100%; }

/* ---------- showing day ---------- */
.showing-card {
  display: block; padding: 22px 24px; margin-top: 22px;
  background: linear-gradient(135deg, var(--blush-wash) 0%, #fff 60%);
  border-color: var(--blush); transition: all .18s var(--ease);
}
.showing-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.showing-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.showing-title { font-family: var(--font-display); font-style: italic; font-size: 25px; margin-top: 3px; }
.showing-count {
  width: 42px; height: 42px; flex: none; border-radius: 50%;
  background: var(--mauve); color: #fff; display: grid; place-items: center;
  font-size: 18px; font-weight: 600;
}
.showing-strip {
  display: flex; flex-direction: column; gap: 7px;
  margin: 16px 0 14px; padding-top: 14px; border-top: 1px solid var(--blush);
}
.strip-stop { display: flex; gap: 12px; align-items: baseline; font-size: 13.5px; }
.strip-time { width: 62px; flex: none; color: var(--mauve-deep); font-weight: 600; }
.strip-addr { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.showing-cta { font-size: 13px; font-weight: 600; color: var(--mauve-deep); }

.lineup { display: flex; flex-direction: column; }
.stop { display: flex; gap: 16px; }
.stop-rail { display: flex; flex-direction: column; align-items: center; flex: none; width: 30px; }
.stop-num {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: var(--mauve); color: #fff; display: grid; place-items: center;
  font-size: 13px; font-weight: 700; margin-top: 20px;
}
.stop-line { flex: 1; width: 2px; background: var(--blush); margin: 6px 0; }
.stop-card { flex: 1; padding: 18px 20px; margin-bottom: 14px; }
.stop-time { font-size: 12.5px; font-weight: 700; letter-spacing: .05em; color: var(--mauve-deep); }
.stop-addr { font-size: 16.5px; font-weight: 600; margin-top: 2px; }

@media (max-width: 860px) {
  .showing-title { font-size: 21px; }
  .stop { gap: 12px; }
  .stop-card { padding: 15px 16px; }
}

/* ---------- boot / auth screens ---------- */
.boot-screen {
  position: fixed; inset: 0; z-index: 90;
  background: var(--cream);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; padding: 32px; text-align: center;
}
.boot-mark {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid var(--blush); border-top-color: var(--mauve);
  animation: boot-spin .8s linear infinite;
}
@keyframes boot-spin { to { transform: rotate(360deg) } }
.boot-msg { font-size: 15px; color: var(--text); max-width: 46ch; }
.boot-sub { font-size: 13.5px; color: var(--text-muted); max-width: 46ch; line-height: 1.55; }

.login-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.login-lede { font-size: 14px; color: var(--text-muted); line-height: 1.55; margin-bottom: 18px; }

.nav-signout {
  width: 30px; height: 30px; flex: none; border-radius: 8px;
  display: grid; place-items: center; color: #9C8F95;
  transition: all .15s var(--ease);
}
.nav-signout:hover { background: rgba(255,255,255,.1); color: #fff; }
.nav-signout svg { width: 16px; height: 16px; }

.doc-bar { height: 8px; background: var(--cream-deep); border-radius: 999px; overflow: hidden; }
.doc-bar-fill { height: 100%; background: var(--mauve); border-radius: 999px; transition: width .4s var(--ease); }

.doc-row.doc-open { background: var(--blush-wash); }
.doc-row .doc-note { order: 2; }
.doc-row .doc-meta { order: 3; margin-top: 6px; }

/* "waiting on you" reads as action; "waiting on them" reads as calm. */
.wait-you  { color: var(--mauve-deep); font-weight: 600; }
.wait-them { color: var(--text-muted); }

.sec-head h2 + p { max-width: 44ch; }

/* ---------- notifications card ---------- */
.install-steps {
  margin: 14px 0 0; padding-left: 20px;
  font-size: 13.5px; line-height: 1.8; color: var(--text);
}
.install-steps li::marker { color: var(--mauve); font-weight: 600; }

.push-error {
  margin-top: 12px; font-size: 13px; line-height: 1.55;
  color: var(--mauve-dark); background: var(--blush-wash);
  border-radius: var(--r-sm); padding: 10px 12px;
}

/* ---------- one house, and what they think of it ---------- */
/* Phone-first: this is read standing in a driveway, not at a desk. */

/* ⚠️ .home-photo is aspect-ratio 4/3, which is right on a grid card and
   enormous on a full-width page — 1080px wide meant 810px of photo, pushing
   everything below the fold. Cap it. */
.house .home-photo { aspect-ratio: 16 / 9; max-height: 420px; }

.house-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; }
.house-price { font-size: 26px; font-weight: 700; }
.house-addr { font-size: 18px; font-weight: 600; line-height: 1.3; }

.house-remarks { margin-top: 4px; }
.house-remarks p {
  font-size: 14.5px; line-height: 1.65; color: var(--text); margin-top: 6px;
  white-space: pre-line;
}

.notes-panel { padding: 20px 22px 22px; margin-top: 16px; }
.notes-title { font-size: 17px; }
.notes-lede { font-size: 13.5px; line-height: 1.55; color: var(--text-muted); margin: 6px 0 16px; }

.note-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.note { border-radius: 12px; padding: 11px 13px; }
/* Theirs vs hers has to be obvious at a glance, and not by colour alone —
   the label says who, the alignment reinforces it. */
.note.mine   { background: var(--blush-wash); align-self: flex-end; max-width: 88%; }
.note.theirs { background: var(--cream-deep);  align-self: flex-start; max-width: 88%; }
.note-who {
  font-size: 11px; letter-spacing: .07em; text-transform: uppercase;
  color: var(--text-faint); margin-bottom: 4px; display: flex; gap: 8px; align-items: baseline;
}
.note-body { font-size: 14.5px; line-height: 1.55; white-space: pre-line; }

.note-form { display: flex; flex-direction: column; gap: 10px; }
.note-form textarea { width: 100%; }

.house-mls {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 18px;
  font-size: 13.5px; color: var(--text-muted); text-decoration: none;
}
.house-mls:hover { color: var(--mauve-dark); }
.house-mls svg { width: 13px; height: 13px; }

/* Message-first on the agent page: this is how a client is meant to reach her,
   so it gets the weight, and the phone number sits underneath. */
.message-cta {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 22px; margin-top: 14px; text-decoration: none; color: inherit;
  transition: border-color .15s var(--ease), transform .15s var(--ease);
}
.message-cta:hover { border-color: var(--mauve); transform: translateY(-1px); }
.message-cta > svg:first-child { width: 26px; height: 26px; color: var(--mauve-deep); flex: none; }
.message-cta-title { font-size: 16px; font-weight: 600; }
.message-cta-go { width: 18px; height: 18px; color: var(--text-faint); flex: none; }

/* The listing page itself, embedded. */
.house-embed { position: relative; background: var(--cream-deep); }
/* Tovah, seeing it work: "anyway to make it render larger?" The frame takes
   most of the viewport, and the page widens for it — .main is capped at
   1080px for reading, which is the wrong cap for a listing app. */
.house-embed iframe {
  display: block; width: 100%; height: 86vh; min-height: 640px; border: 0;
  background: var(--cream-deep);
}
.main:has(.house) { max-width: 1480px; }
.house-embed.failed { background: transparent; }
.embed-out {
  position: absolute; right: 12px; bottom: 12px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.94); backdrop-filter: blur(6px);
  padding: 7px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  color: var(--text); text-decoration: none; box-shadow: var(--shadow-sm);
}
.embed-out svg { width: 12px; height: 12px; }

/* A desktop listing app in a phone-width box is unusable, so on small screens
   the frame gets taller and scrolls on its own rather than being squeezed. */
@media (max-width: 720px) {
  .house-embed iframe { height: 78vh; }
}

/* A stop that is a real home: the card is the way in. */
.stop-house { display: block; margin-top: 12px; border-radius: 12px; overflow: hidden; text-decoration: none; color: inherit; position: relative; }
.stop-house .home-photo { aspect-ratio: 16 / 9; max-height: 220px; }
.stop-house-go {
  position: absolute; left: 10px; bottom: 10px;
  background: rgba(255,255,255,.94); backdrop-filter: blur(6px);
  padding: 6px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--text);
}
.stop-last-note { margin-top: 8px; font-size: 13.5px; line-height: 1.5; color: var(--text-muted); }
.stop-last-note .who { display: block; font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 2px; }

/* ---------- agent preview (client.html?as=<contactId>) ---------- */
.preview-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  background: var(--ink); color: #fff; border-radius: var(--r); padding: 11px 16px; margin-bottom: 22px;
  font-size: 13.5px; line-height: 1.45; }
.preview-bar a { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.preview-toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 84px); transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 13.5px;
  box-shadow: var(--shadow-lg); z-index: 60; max-width: calc(100vw - 32px); text-align: center; }

/* Merge anchors for parallel build agents (2026-09-20). Each agent edits only its own. */
/* @@portal-css-A */
/* ---- deal dates countdown (0030, agent A) ---- */
.deal-card { padding: 22px 24px; background: var(--blush-wash); border: 1px solid var(--blush); }
.deal-line { display: flex; justify-content: space-between; align-items: baseline; gap: 6px 14px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--blush); }
.deal-line:last-child { border-bottom: 0; padding-bottom: 0; }
.deal-card .eyebrow + .deal-line { padding-top: 12px; }
.deal-what { font-size: 15.5px; font-weight: 600; }
.deal-when { font-size: 14px; color: var(--text-muted); }
.deal-sep { margin: 0 6px; }
.deal-togo.today { color: var(--mauve-dark); font-weight: 700; }
/* -- */

/* @@portal-css-B */
/* ---------- ask for a review (0031) ---------- */
.review-card { padding: 26px 28px; margin-bottom: 22px; background: linear-gradient(135deg, var(--blush-wash), var(--card)); border: 1px solid var(--blush); }
.review-title { font-family: var(--font-display); font-style: italic; font-size: 26px; line-height: 1.15; color: var(--ink); }
.review-note { color: var(--text-muted); margin: 8px 0 16px; max-width: 44ch; }
.review-card .btn { display: inline-flex; }
/* -- */

/* @@portal-css-C */
/* -- */

/* @@portal-css-D */
/* ---------- in-app calls (0042): call screen, incoming banner, buttons ---------- */
/* ⚠️ The -12px top margin here was tuned for the Messages page, where these
   buttons sit directly under the page header and need pulling up. On "Your
   agent" they follow a CARD, so the same -12px dragged them up over its bottom
   edge (Tovah, 2026-09-20). Tighten only in the case it was meant for. */
.call-cta { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 22px; }
.page-head + .call-cta { margin-top: -12px; }
.call-cta .btn svg, .btn > .ico { width: 15px; height: 15px; flex: none; }
body.on-call { overflow: hidden; }
.call-layer { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; background: var(--ink); color: #fff;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 16px calc(14px + env(safe-area-inset-bottom, 0px)); }
.call-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.call-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.call-av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--mauve); color: #fff; font-weight: 600; font-size: 16px; flex: none; }
.call-av.lg { width: 96px; height: 96px; font-size: 38px; }
.call-name { font-weight: 600; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.call-sub { font-size: 13px; color: rgba(255,255,255,.7); }
.call-timer { font-size: 14px; color: rgba(255,255,255,.8); min-width: 44px; text-align: right; }
.call-stage { flex: 1; position: relative; margin: 14px 0; border-radius: var(--r-lg); overflow: hidden; background: var(--ink-soft); min-height: 0; }
.call-tile video { width: 100%; height: 100%; object-fit: cover; }
.call-remote { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 10px; }
.call-remote.has-video .call-av, .call-remote.has-video .call-wait { display: none; }
.call-wait { font-size: 14px; color: rgba(255,255,255,.75); text-align: center; max-width: 34ch; padding: 0 16px; }
.call-local { position: absolute; right: 12px; bottom: 12px; width: 28%; max-width: 180px; min-width: 96px; aspect-ratio: 3 / 4; border-radius: var(--r); overflow: hidden;
  background: var(--ink); display: grid; place-items: center; box-shadow: var(--shadow-lg); }
.call-local .call-av { width: 34px; height: 34px; font-size: 14px; }
.call-local.has-video .call-av, .call-local.off video { display: none; }
.call-local.off .call-av { display: grid; }
.call-local video { transform: scaleX(-1); }
.call-stage.audio .call-local { display: none; }
.call-line { text-align: center; font-size: 12.5px; color: rgba(255,255,255,.65); margin-bottom: 12px; }
.call-line-btn { color: #fff; text-decoration: underline; text-underline-offset: 3px; font-size: 12.5px; margin-left: 6px; }
.call-bar { display: flex; justify-content: center; gap: 18px; }
.call-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; color: #fff; font-size: 12px; min-width: 64px; }
.call-btn svg { width: 54px; height: 54px; padding: 15px; border-radius: 50%; background: rgba(255,255,255,.14); }
.call-btn[aria-pressed="true"] svg { background: #fff; color: var(--ink); }
.call-btn.call-end svg { background: var(--mauve-deep); }
.call-layer[data-state="ended"] .call-bar { visibility: hidden; }
@keyframes call-rise { from { opacity: 0; transform: translate(-50%, -8px) } }
.call-banner { position: fixed; top: calc(10px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); z-index: 85; width: min(520px, calc(100vw - 24px));
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: var(--r-lg);
  background: var(--ink); color: #fff; box-shadow: var(--shadow-lg); animation: call-rise .22s var(--ease); }
.call-banner-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.call-banner-name { font-weight: 600; font-size: 14.5px; }
.call-banner-sub { font-size: 12.5px; color: rgba(255,255,255,.7); }
.call-banner-actions { display: flex; gap: 8px; margin-left: auto; }
.call-banner .btn-ghost { color: #fff; border-color: rgba(255,255,255,.35); }
.call-banner .btn-primary { background: #fff; color: var(--ink); }
.call-toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 84px); transform: translateX(-50%); background: var(--ink); color: #fff;
  padding: 10px 16px; border-radius: 999px; font-size: 13.5px; box-shadow: var(--shadow-lg); z-index: 95; max-width: calc(100vw - 32px); text-align: center; }
/* -- */


/* a call, logged in the conversation (0044) */
.msg-call { text-align: center; margin: 10px 0; }
.msg-call span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); background: var(--cream-deep); padding: 5px 12px; border-radius: 999px; }

/* ---------- the client's calendar (0047) ---------- */
.ccal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.ccal-month { font-weight: 600; font-size: 16px; }
.ccal-arrow { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; text-decoration: none; font-size: 20px; line-height: 1; color: var(--text-muted); background: var(--cream-deep); }
.ccal-arrow:hover { color: var(--text); }
.ccal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.ccal-dow { margin-bottom: 4px; font-size: 10.5px; font-weight: 600; letter-spacing: .06em; color: var(--text-faint); text-align: center; }
.ccal-cell { height: 42px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 13.5px; border-radius: 12px; }
.ccal-cell.ccal-blank { visibility: hidden; }
.ccal-n { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
.ccal-cell.today .ccal-n { background: var(--mauve-dark); color: #fff; font-weight: 600; }
.ccal-dots { display: flex; gap: 3px; height: 5px; align-items: center; }
.ccal-dot { width: 5px; height: 5px; border-radius: 50%; display: inline-block; flex: none; }
.ccal-dot.k-showing  { background: var(--mauve); }
.ccal-dot.k-deal     { background: var(--mauve-dark); }
.ccal-dot.k-document { background: var(--amber); }
.ccal-dot.k-event    { background: var(--green); }
.ccal-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft); font-size: 11.5px; color: var(--text-muted); }
.ccal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ccal-list { display: flex; flex-direction: column; margin-top: 10px; }
.ccal-item { display: flex; gap: 14px; align-items: flex-start; padding: 13px 0; border-top: 1px solid var(--line-soft); }
.ccal-item:first-child { border-top: 0; }
.ccal-when { flex: none; width: 42px; text-align: center; }
.ccal-dow-s { font-size: 11px; color: var(--text-faint); text-transform: uppercase; letter-spacing: .05em; }
.ccal-day { font-size: 20px; font-weight: 600; line-height: 1.1; }
.ccal-title { font-weight: 600; font-size: 14.5px; }
.ccal-meta { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.ccal-note { font-size: 13px; color: var(--text-muted); margin-top: 5px; line-height: 1.5; white-space: pre-wrap; }

/* ---------- replies + a tagged home in a message (0048) ---------- */
.msg.nested { margin-left: 26px; }
.msg.mine.nested { margin-right: 26px; margin-left: 0; }
.msg-answering { font-size: 11.5px; color: var(--text-faint); margin-bottom: 3px; }
.msg.mine .msg-answering { text-align: right; }
.msg-meta { display: flex; align-items: center; gap: 10px; }
.msg.mine .msg-meta { justify-content: flex-end; }
.msg-reply { font: inherit; font-size: 11.5px; font-weight: 600; color: var(--text-muted); background: none; border: 0; padding: 0; cursor: pointer; opacity: 0; transition: opacity .12s; }
.msg:hover .msg-reply, .msg:focus-within .msg-reply { opacity: 1; }
@media (hover: none) { .msg-reply { opacity: 1; } }
.msg-reply:hover { color: var(--text); }

.msg-home { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 8px; border-radius: 12px; background: rgba(0,0,0,.05); text-decoration: none; color: inherit; }
.msg.mine .msg-home { background: rgba(255,255,255,.16); }
.msg-home-ph { width: 46px; height: 40px; border-radius: 8px; overflow: hidden; background: var(--cream-deep); display: grid; place-items: center; flex: none; color: var(--text-faint); }
.msg-home-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.msg-home-txt { min-width: 0; font-size: 12.5px; line-height: 1.35; }
.msg-home-txt b { display: block; font-size: 13px; }

.composer { flex-direction: column; align-items: stretch; gap: 8px; }
.composer-row { display: flex; gap: 10px; align-items: flex-end; }
.composer-row textarea { flex: 1; min-width: 0; }
.composer-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.composer-tags:empty { display: none; }
.composer-tag { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; padding: 5px 6px 5px 11px; border-radius: 999px; background: var(--blush-pale); color: var(--mauve-dark); }
.composer-tag[hidden] { display: none; }
.composer-tag button { font: inherit; font-size: 15px; line-height: 1; background: none; border: 0; cursor: pointer; color: inherit; padding: 0 5px; }

.homepick { position: relative; flex: none; }
.homepick-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--card, #fff); color: var(--text-muted); display: grid; place-items: center; cursor: pointer; }
.homepick-btn:hover { color: var(--text); border-color: var(--mauve); }
.homepick-menu { position: absolute; bottom: calc(100% + 8px); left: 0; width: min(320px, 78vw); max-height: 300px; overflow-y: auto; background: var(--card, #fff); border-radius: 16px; padding: 8px; z-index: 30; box-shadow: 0 18px 50px rgba(0,0,0,.16), 0 0 0 1px rgba(0,0,0,.05); }
.homepick-head { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); padding: 6px 10px 8px; }
.homepick-opt { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; font: inherit; background: none; border: 0; padding: 8px 10px; border-radius: 12px; cursor: pointer; color: inherit; }
.homepick-opt:hover { background: var(--blush-wash); }
.homepick-ph { width: 44px; height: 38px; border-radius: 8px; overflow: hidden; background: var(--cream-deep); display: grid; place-items: center; flex: none; color: var(--text-faint); }
.homepick-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.homepick-opt b { display: block; font-size: 13.5px; }
.homepick-opt small { color: var(--text-muted); font-size: 12px; }

/* "Keep these dates on your phone": two buttons, nothing else (2026-09-20) */
.ccal-sub-t { font-weight: 600; font-size: 15px; }
.ccal-apps { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.ccal-app { display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; text-decoration: none; color: var(--text); font-weight: 600; font-size: 14.5px; }
.ccal-app:hover { border-color: var(--mauve); }
.ccal-app { font: inherit; cursor: pointer; }
.ccal-app.on { border-color: var(--mauve-dark); box-shadow: 0 0 0 1.5px var(--mauve-dark) inset; }
.ccal-panel { margin-top: 16px; }
.ccal-panel[hidden] { display: none; }
.ccal-go { margin-top: 2px; }
.ccal-addr-row { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.ccal-addr { flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px;
  padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--cream-deep); color: var(--text); }
.ccal-addr-row .btn { flex: none; }
.ccal-ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 14px; font-size: 14px; line-height: 1.55; }
.ccal-ol li::marker { color: var(--text-faint); font-weight: 600; }
.ccal-ol b { font-weight: 600; }
.ccal-fallback { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.ccal-step-t { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); }
.ccal-fallback p { font-size: 13.5px; color: var(--text-muted); line-height: 1.5; margin-top: 6px; }
