/*
 * Unified organic funnel styles (flag-gated).
 * Loaded ONLY when ZONED_UNIFIED_ORGANIC_FUNNEL_ENABLED injects the panel,
 * so nothing here can affect the flag-off page. Ottawa system: snow/paper
 * surfaces, mist borders, ink ramp, Sora display at -0.02em, maple CTA,
 * restrained motion with reduced-motion respected.
 */

/* First paint: the injected head script stamps html.zu-boot, which holds
   the homepage form below the server-rendered panel until unified-funnel.js
   applies its own stage visibility and removes the class. Report mode exposes
   its existing address group immediately. */
html.zu-boot #leadCaptureForm > :not(#ziUnifiedPanel) { display: none !important; }
html.zu-boot.zu-report-boot #leadCaptureForm > .form-group:has(#formAddress) { display: block !important; }
html.zu-boot #ziFormCard > .value-badge { display: none !important; }
html.zu-boot #nurtureRotator,
html.zu-boot #ziHeroLede,
html.zu-boot #welcomeSubtitle,
html.zu-boot #welcomeTitle { display: none !important; }

/* The panel owns the headline, so the legacy hero copy stands down while
   the unified funnel runs (the report view still takes the page over on
   submit exactly as today). */
body.zu-on #nurtureRotator,
body.zu-on #ziHeroLede,
body.zu-on #welcomeSubtitle,
body.zu-on #welcomeTitle { display: none !important; }

.zu-hidden { display: none !important; }

.zu-live {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ── One dominant panel ─────────────────────────────────────────────── */

.zu-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 760px;
  margin: 0 auto 26px;
  padding: 8px 16px 0;
}

.zu-panel-kicker {
  margin: 0 0 9px;
  color: #c8102e;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.085em;
  line-height: 1;
  text-transform: uppercase;
}

.zu-panel-headline {
  font-family: 'Sora', 'Inter', sans-serif;
  font-weight: 800;
  letter-spacing: -0.045em;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.04;
  color: #1b1e22;
  margin: 0 0 12px;
  text-wrap: balance;
}

.zu-panel-support {
  font-size: 17px;
  line-height: 1.5;
  color: #5b6670;
  margin: 0;
  max-width: 42em;
  text-wrap: balance;
}

body.zu-on.zi-stage-doors #homeIntentForkGroup { margin: 0; }
body.zu-on.zi-stage-doors #homeIntentForkGrid { width: 100%; }

body.zu-on.zi-stage-doors #homeIntentForkGrid [data-identity="own_property"],
body.zu-on.zi-stage-doors #homeIntentForkGrid [data-identity="buying_selling"] {
  display: none !important;
}

body.zu-on.zi-stage-doors .home-intent-fork-grid.path-groups.zu-single-consumer-entry {
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 34px;
  width: min(100%, 1040px);
  margin: 0 auto;
}

body.zu-on.zi-stage-doors .zu-single-consumer-entry::after { display: none; }

body.zu-on.zi-stage-doors .zu-single-consumer-entry .zu-primary-path,
body.zu-on.zi-stage-doors .zu-single-consumer-entry .zu-growth-path { padding: 0; }

body.zu-on.zi-stage-doors .zu-single-consumer-entry .path-group-header {
  min-height: 0;
  margin-bottom: 14px;
}

body.zu-on.zi-stage-doors .zu-single-consumer-entry .zu-primary-path .path-group-header {
  display: none;
}

body.zu-on.zi-stage-doors .zu-single-consumer-entry .zu-primary-path .path-card-grid {
  grid-template-columns: minmax(0, 1fr);
  position: relative;
}

body.zu-on.zi-stage-doors .zu-single-consumer-entry .zu-growth-path {
  padding-top: 30px;
  border-top: 1px solid #e4e7ec;
}

body.zu-on.zi-stage-doors .zu-single-consumer-entry .zu-growth-path .path-card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.zu-on.zi-stage-doors:not(.zoned-report-mode) .home-intent-fork-grid.path-groups .zu-main-door {
  grid-template-columns: minmax(300px, 48%) minmax(0, 1fr);
  min-height: 220px;
}

.zu-report-demo-media {
  container: zu-report-demo / inline-size;
  background:
    radial-gradient(circle at 18% 12%, rgba(200, 16, 46, 0.08), transparent 34%),
    linear-gradient(145deg, #fffdfa 0%, #f6f8fa 100%);
}

.zu-report-demo {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  padding: clamp(14px, 2.1vw, 24px);
  flex-direction: row;
  gap: 12px;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.zu-report-demo .zi-demo-svg {
  flex: 0 1 40%;
  width: 40%;
  min-width: 0;
  filter: drop-shadow(0 8px 14px rgba(15, 23, 42, 0.08));
}

.zu-report-demo .zi-demo-bld,
.zu-report-demo .zi-demo-env {
  transform-box: fill-box;
  transform-origin: center;
}

.zu-report-demo .zi-demo-caption {
  width: auto;
  align-items: flex-start;
  gap: 9px;
  text-align: left;
}
.zu-report-demo .zi-demo-addr { font-size: 14px; }
.zu-report-demo .zi-demo-facts {
  flex-wrap: nowrap;
  gap: 4px;
  max-width: 100%;
}
.zu-report-demo .zi-demo-chip {
  flex: 0 0 auto;
  padding: 4px 6px;
  background: rgba(255, 255, 255, 0.88);
  border-color: #dce3e8;
  box-shadow: 0 2px 7px rgba(15, 23, 42, 0.05);
  font-size: 10px;
  white-space: nowrap;
}

@container zu-report-demo (max-width: 499px) {
  .zu-report-demo {
    flex-direction: column;
    justify-content: center;
    gap: 7px;
    padding: 11px 12px;
  }

  .zu-report-demo .zi-demo-svg {
    width: min(72%, 360px);
    flex-basis: auto;
  }

  .zu-report-demo .zi-demo-caption {
    flex: 0 0 auto;
    width: 100%;
    align-items: center;
    gap: 6px;
    text-align: center;
  }

  .zu-report-demo .zi-demo-addr { font-size: 12.5px; }
  .zu-report-demo .zi-demo-facts {
    width: 100%;
    justify-content: center;
    gap: 3px;
  }
  .zu-report-demo .zi-demo-chip {
    padding: 3px 4px;
    font-size: 8.5px;
  }
}

.zu-report-demo.zu-report-demo-compact {
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  padding: 11px 12px;
}

.zu-report-demo.zu-report-demo-compact .zi-demo-svg {
  width: min(72%, 360px);
  flex-basis: auto;
}

.zu-report-demo.zu-report-demo-compact .zi-demo-caption {
  flex: 0 0 auto;
  width: 100%;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.zu-report-demo.zu-report-demo-compact .zi-demo-addr { font-size: 12.5px; }
.zu-report-demo.zu-report-demo-compact .zi-demo-facts {
  width: 100%;
  justify-content: center;
  gap: 3px;
}
.zu-report-demo.zu-report-demo-compact .zi-demo-chip {
  padding: 3px 4px;
  font-size: 8.5px;
}

.zu-report-demo .zi-demo-lot { animation: zuDemoLot 7s linear infinite; }
.zu-report-demo .zi-demo-bld { animation: zuDemoBuilding 7s cubic-bezier(0.16, 1, 0.3, 1) infinite; }
.zu-report-demo .zi-demo-env { animation: zuDemoEnvelope 7s cubic-bezier(0.16, 1, 0.3, 1) infinite; }
.zu-report-demo .zi-demo-label-lot { animation: zuDemoLabelLot 7s cubic-bezier(0.16, 1, 0.3, 1) infinite; }
.zu-report-demo .zi-demo-label-bld { animation: zuDemoLabelBuilding 7s cubic-bezier(0.16, 1, 0.3, 1) infinite; }
.zu-report-demo .zi-demo-label-env { animation: zuDemoLabelEnvelope 7s cubic-bezier(0.16, 1, 0.3, 1) infinite; }
.zu-report-demo .zi-demo-typing { animation: zuDemoType 7s steps(26, end) infinite; }
.zu-report-demo .zi-demo-chip-1 { animation: zuDemoChipOne 7s cubic-bezier(0.16, 1, 0.3, 1) infinite; }
.zu-report-demo .zi-demo-chip-2 { animation: zuDemoChipTwo 7s cubic-bezier(0.16, 1, 0.3, 1) infinite; }
.zu-report-demo .zi-demo-chip-3 { animation: zuDemoChipThree 7s cubic-bezier(0.16, 1, 0.3, 1) infinite; }
.zu-report-demo.zu-demo-paused * { animation-play-state: paused !important; }

/* The clone carries no background of its own: the gradient lives on the
   uncloned .zu-report-demo-media parent, so restate it or the ghost flies
   as a bare rectangle. */
.zi-door-ghost .zu-report-demo-ghost {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 18% 12%, rgba(200, 16, 46, 0.08), transparent 34%),
    linear-gradient(145deg, #fffdfa 0%, #f6f8fa 100%);
}

@keyframes zuDemoType {
  0% { width: 0; opacity: 1; border-right-color: #c8102e; }
  5% { width: var(--type-end-width, 100%); opacity: 1; border-right-color: #c8102e; }
  6%, 94% { width: var(--type-end-width, 100%); opacity: 1; border-right-color: transparent; }
  100% { width: var(--type-end-width, 100%); opacity: 0; border-right-color: transparent; }
}

@keyframes zuDemoLot {
  0%, 2% { stroke-dashoffset: 1; opacity: 1; }
  10.5%, 94% { stroke-dashoffset: 0; opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}

@keyframes zuDemoBuilding {
  0%, 7% { opacity: 0; transform: scale(0.96); }
  14%, 94% { opacity: 0.9; transform: scale(1); }
  100% { opacity: 0; transform: scale(1); }
}

@keyframes zuDemoEnvelope {
  0%, 11% { opacity: 0; transform: scale(0.94); }
  19% { opacity: 1; transform: scale(1); }
  21% { opacity: 0.76; transform: scale(1); }
  24%, 94% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1); }
}

@keyframes zuDemoLabelLot {
  0%, 9% { opacity: 0; transform: translateY(2px); }
  14%, 94% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: none; }
}

@keyframes zuDemoLabelBuilding {
  0%, 11% { opacity: 0; transform: translateY(2px); }
  16%, 94% { opacity: 0.95; transform: none; }
  100% { opacity: 0; transform: none; }
}

@keyframes zuDemoLabelEnvelope {
  0%, 16% { opacity: 0; transform: translateY(2px); }
  21%, 94% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: none; }
}

@keyframes zuDemoChipOne {
  0%, 15% { opacity: 0; transform: translateY(3px); }
  21%, 94% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: none; }
}

@keyframes zuDemoChipTwo {
  0%, 18% { opacity: 0; transform: translateY(3px); }
  24%, 94% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: none; }
}

@keyframes zuDemoChipThree {
  0%, 22% { opacity: 0; transform: translateY(3px); }
  27.5%, 94% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: none; }
}

body.zoned-report-mode.zu-on.zi-stage-doors .zu-panel {
  max-width: 850px;
  margin-bottom: 28px;
}

body.zoned-report-mode #zuAddressBack { display: none; }
body.zoned-report-mode #zuAddressActions { justify-content: flex-end; }

/* ── Stage chrome (headings, actions, reveal) ───────────────────────── */

.zu-stage-heading {
  display: block;
  font-family: 'Sora', 'Inter', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 20px;
  line-height: 1.25;
  color: #1b1e22;
  margin: 0 0 6px;
}

.zu-stage-heading:focus { outline: none; }

.zu-stage-sub {
  margin: 0 0 14px;
  font-size: 14px;
  color: #5b6670;
}

.zu-stage-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
}

.zu-continue-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #c8102e 0%, #a70f27 100%);
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 12px 24px;
  font-family: 'Sora', 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(200, 16, 46, 0.22);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.zu-continue-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(200, 16, 46, 0.28); }
.zu-continue-btn:focus-visible { outline: 3px solid #3b7fa4; outline-offset: 2px; }

.zu-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: #5b6670;
  border: 1px solid #e2d8d0;
  border-radius: 10px;
  padding: 11px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.16s ease, color 0.16s ease;
}

.zu-back-btn:hover { border-color: #c9bdb2; color: #1b1e22; }
.zu-back-btn:focus-visible { outline: 3px solid #3b7fa4; outline-offset: 2px; }

.zu-reveal { animation: zuRise 0.34s cubic-bezier(0.16, 1, 0.3, 1) both; }

@keyframes zuRise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* ── Goals stage ────────────────────────────────────────────────────── */

.zu-goals {
  border: 0;
  padding: 0;
  margin: 4px 0 8px;
  min-width: 0;
}

.zu-goals-hint {
  margin: 0 0 14px;
  font-size: 14px;
  color: #5b6670;
}

.zu-goal-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.zu-goal-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  border: 1px solid #e2d8d0;
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}

.zu-goal-card:hover { border-color: #c9bdb2; box-shadow: 0 4px 14px rgba(27, 30, 34, 0.06); }

.zu-goal-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.zu-goal-check {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid #c9bdb2;
  background: #fff;
  color: #fff;
  transition: background-color 0.16s ease, border-color 0.16s ease;
}

.zu-goal-check svg { opacity: 0; transition: opacity 0.16s ease; }

.zu-goal-input:checked + .zu-goal-check {
  background: #c8102e;
  border-color: #c8102e;
}

.zu-goal-input:checked + .zu-goal-check svg { opacity: 1; }

.zu-goal-title {
  font-size: 15px;
  font-weight: 600;
  color: #1b1e22;
  line-height: 1.3;
}

.zu-goal-card--quiet .zu-goal-title { font-weight: 500; }

.zu-goal-card:has(.zu-goal-input:checked) {
  border-color: #c8102e;
  background: #fdf4f5;
}

.zu-goal-card:has(.zu-goal-input:focus-visible) {
  outline: 3px solid #3b7fa4;
  outline-offset: 2px;
}

.zu-goals-error {
  margin: 12px 0 0;
  font-size: 13.5px;
  font-weight: 600;
  color: #a70f27;
}

/* Mirror for submit-time errors whose host group (#leadFormError inside the
   hidden project-interest group) is never visible in the unified flow. */
.zu-form-error {
  margin: 12px 0 0;
  padding: 10px 14px;
  border: 1px solid rgba(200, 16, 46, 0.28);
  border-radius: 10px;
  background: #fbeef0;
  color: #a70f27;
  font-size: 13.5px;
  line-height: 1.45;
}

@media (min-width: 560px) {
  .zu-goal-grid { grid-template-columns: 1fr 1fr; }
  .zu-goal-card--quiet { grid-column: auto; }
}

@media (max-width: 559px) {
  .zu-panel { margin-bottom: 20px; padding-inline: 8px; }
  .zu-panel-headline { font-size: clamp(32px, 10vw, 42px); }
  .zu-panel-support { font-size: 15px; }
  .zu-stage-actions { flex-direction: row; }
}

html.zu-boot body.z-public-home .chat-container.welcome-centered,
body.z-public-home.zu-on.zi-stage-doors:not(.zoned-report-mode):not(.zi-door-hero-on):not(.zu-report-on) .chat-container.welcome-centered,
body.z-public-home.zoned-report-mode.zu-on:not(.zi-door-hero-on):not(.zu-report-on) .chat-container.welcome-centered {
  padding-top: var(--z-public-first-content-top, 24px);
}

html.zu-boot body.z-public-home .chat-container.welcome-centered .chat-messages,
body.z-public-home.zu-on.zi-stage-doors:not(.zoned-report-mode):not(.zi-door-hero-on):not(.zu-report-on) .chat-container.welcome-centered .chat-messages,
body.z-public-home.zoned-report-mode.zu-on:not(.zi-door-hero-on):not(.zu-report-on) .chat-container.welcome-centered .chat-messages {
  padding-top: 4px;
}

html.zu-boot body.z-public-home .chat-container.welcome-centered .welcome-state,
body.z-public-home.zu-on.zi-stage-doors:not(.zoned-report-mode):not(.zi-door-hero-on):not(.zu-report-on) .chat-container.welcome-centered .welcome-state,
body.z-public-home.zoned-report-mode.zu-on:not(.zi-door-hero-on):not(.zu-report-on) .chat-container.welcome-centered .welcome-state {
  padding-top: 0;
}

html.zu-boot body.z-public-home #ziHero,
body.z-public-home.zu-on.zi-stage-doors:not(.zoned-report-mode):not(.zi-door-hero-on):not(.zu-report-on) #ziHero,
body.z-public-home.zoned-report-mode.zu-on:not(.zi-door-hero-on):not(.zu-report-on) #ziHero {
  display: none;
}

html.zu-boot body.z-public-home #leadCaptureForm,
body.z-public-home.zu-on.zi-stage-doors:not(.zoned-report-mode):not(.zi-door-hero-on):not(.zu-report-on) #leadCaptureForm,
body.z-public-home.zoned-report-mode.zu-on:not(.zi-door-hero-on):not(.zu-report-on) #leadCaptureForm {
  padding-top: 0;
}

html.zu-boot body.z-public-home #ziFormCard,
body.z-public-home.zu-on.zi-stage-doors:not(.zoned-report-mode):not(.zi-door-hero-on):not(.zu-report-on) #ziFormCard,
body.z-public-home.zoned-report-mode.zu-on:not(.zi-door-hero-on):not(.zu-report-on) #ziFormCard {
  margin-top: 0;
}

@media (max-width: 680px) {
  body.z-public-home.zu-on:not(.zi-door-hero-on):not(.zu-report-on) .chat-container.welcome-centered {
    padding-inline: 16px;
  }

  body.z-public-home.zu-on:not(.zi-door-hero-on):not(.zu-report-on) .chat-container.welcome-centered .chat-messages,
  body.z-public-home.zu-on:not(.zi-door-hero-on):not(.zu-report-on) .chat-container.welcome-centered .welcome-state {
    padding-inline: 0;
  }

  .zu-panel {
    width: 100%;
    max-width: none;
    padding-inline: 0;
  }

  .zu-panel-headline {
    width: 100%;
    font-size: clamp(30px, 8.5vw, 36px);
  }

  .zu-panel-support {
    width: 100%;
    max-width: none;
    font-size: 15px;
    text-wrap: pretty;
  }
}

@media (max-width: 799px) {
  body.zu-on.zi-stage-doors .zu-single-consumer-entry .zu-growth-path .path-card-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 768px) {
  body.zu-on.zi-stage-doors:not(.zoned-report-mode) .home-intent-fork-grid.path-groups .zu-main-door {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    grid-template-areas:
      "media"
      "chip"
      "body";
    min-height: 0;
  }

  body.zu-on.zi-stage-doors:not(.zoned-report-mode) .home-intent-fork-grid.path-groups .zu-main-door .hi-door-media {
    width: 100%;
    height: auto;
    aspect-ratio: 32 / 21;
  }

  body.zu-on.zi-stage-doors:not(.zoned-report-mode) .home-intent-fork-grid.path-groups .zu-main-door .hi-door-chip {
    padding-top: 16px;
  }

  body.zu-on.zi-stage-doors:not(.zoned-report-mode) .home-intent-fork-grid.path-groups .zu-main-door .hi-door-body {
    padding-right: 64px;
    padding-bottom: 18px;
  }

}

/* Post-report paired partner footer (floating_headshots_v1). Two floating
   matched portraits anchored bottom right like a chat presence, speech
   bubbles pointing toward the page middle; selecting one grows it to exactly
   1.25x and reveals that professional's request panel. Never a modal. */
.zu-handoff {
  position: fixed;
  right: max(12px, env(safe-area-inset-right, 0px));
  bottom: calc(var(--zoned-consent-clearance, 0px) + max(12px, env(safe-area-inset-bottom, 0px)));
  z-index: 10010;
  width: min(400px, calc(100vw - 24px));
  margin: 0;
  color: #1b1e22;
}

.zu-handoff[hidden] { display: none !important; }

body.zu-on #stickyRealtorHandoff,
body.zu-on .sticky-realtor-handoff,
body.zu-on .sticky-realtor-thankyou,
body.zu-on #ottawaProjectCtaOverlay,
body.zu-on .ottawa-project-cta-overlay,
body.zu-on #ottawaBubblePanel,
body.zu-on .ottawa-bubble-panel,
body.zu-on #ottawaStartIntentModal {
  display: none !important;
}

body.zu-handoff-visible .zfbw-launcher,
body.zu-handoff-visible .zfbw-panel { display: none !important; }

body.zu-handoff-visible {
  --zoned-page-bottom-reserve: 200px;
  padding-bottom: var(--zoned-page-bottom-reserve);
}

body.zu-handoff-visible.zu-handoff-min {
  --zoned-page-bottom-reserve: 72px;
}

.zu-pf {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.zu-handoff--min .zu-pf { display: none; }

.zu-pf-min {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(226, 216, 208, 0.75);
  border-radius: 999px;
  background: rgba(255, 253, 250, 0.9);
  color: #8a94a0;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(27, 30, 34, 0.1);
  transition: border-color 0.16s ease, color 0.16s ease, background-color 0.16s ease;
}

.zu-pf-min:hover { border-color: #c9bdb2; background: #f8f4ef; color: #1b1e22; }

.zu-pf-min:focus-visible,
.zu-pf-portrait:focus-visible,
.zu-pf-restore:focus-visible {
  outline: 3px solid #3b7fa4;
  outline-offset: 3px;
}

/* Selected professional's panel: floats above the duo, right aligned, and
   caps itself instead of pushing report content around. */
.zu-pf-detail {
  display: block;
  width: min(320px, 100%);
  align-self: flex-end;
}

.zu-handoff-card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  max-height: calc(100vh - var(--zoned-consent-clearance, 0px) - 240px);
  max-height: calc(100dvh - var(--zoned-consent-clearance, 0px) - 240px);
  padding: 16px 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid #e2d8d0;
  border-radius: 18px;
  background: rgba(255, 253, 250, 0.985);
  box-shadow: 0 22px 64px rgba(27, 30, 34, 0.2), 0 4px 14px rgba(27, 30, 34, 0.08);
  animation: zuPfPanelIn 0.24s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.zu-handoff-card[hidden] { display: none !important; }

@keyframes zuPfPanelIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.zu-handoff-card:focus { outline: none; }

/* Identity card: a named, reachable professional at a real company, with
   only the claims the match itself proves. */
.zu-pf-id {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-bottom: 11px;
  border-bottom: 1px solid #f1ebe6;
}

.zu-pf-id[hidden] { display: none !important; }

.zu-pf-id-name {
  margin: 0;
  font-family: 'Sora', 'Inter', sans-serif;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: #1b1e22;
}

.zu-pf-id-org {
  margin: 0;
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.35;
  color: #5b6670;
}

.zu-pf-id-phone {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 8px;
  min-height: 44px;
  margin-top: 5px;
  padding: 8px 14px 8px 10px;
  border: 1px solid rgba(28, 107, 90, 0.35);
  border-radius: 12px;
  background: rgba(28, 107, 90, 0.07);
  color: #17603a;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}

.zu-pf-id-phone[hidden] { display: none !important; }

.zu-pf-id-phone:hover {
  border-color: rgba(28, 107, 90, 0.6);
  background: rgba(28, 107, 90, 0.12);
}

.zu-pf-id-phone:focus-visible {
  outline: 3px solid #3b7fa4;
  outline-offset: 2px;
}

.zu-pf-id-phone-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(28, 107, 90, 0.14);
  color: #1c6b5a;
}

.zu-pf-id-trust {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 6px 0 0;
  color: #17603a;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.3;
}

.zu-pf-id-trust::before {
  content: "";
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #1c6b5a;
}

.zu-pf-id-note {
  margin: 5px 0 0;
  color: #5b6670;
  font-size: 12.5px;
  line-height: 1.45;
}

.zu-handoff-status {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f4efe9;
  color: #3d3831;
  font-size: 13.5px;
  line-height: 1.5;
}

.zu-handoff-contact[hidden] { display: none !important; }

.zu-handoff-contact {
  display: grid;
  gap: 9px;
}

.zu-handoff-contact-prompt {
  margin: 0;
  color: #a70f27;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.075em;
  line-height: 1.2;
  text-transform: uppercase;
}

.zu-handoff-contact-prompt:empty { display: none; }

/* Request-only actions: one calm stack of equal-weight pills, warm paper on
   mist borders with a parliament-green hover, echoing the matched ring. No
   loud primary; the whole point is low pressure. */
.zu-handoff-contact-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.zu-handoff-contact-action {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid #e2d8d0;
  border-radius: 14px;
  background: #fff;
  color: #1b1e22;
  font: inherit;
  font-size: 13.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.zu-handoff-contact-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #f1ebe6;
  color: #5b6670;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.zu-handoff-contact-action:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(28, 107, 90, 0.55);
  background: #f7f4ef;
  box-shadow: 0 6px 18px rgba(27, 30, 34, 0.08);
}

.zu-handoff-contact-action:hover:not(:disabled) .zu-handoff-contact-action-icon {
  background: rgba(28, 107, 90, 0.12);
  color: #1c6b5a;
}

.zu-handoff-contact-action:focus-visible {
  outline: 3px solid #3b7fa4;
  outline-offset: 2px;
}

.zu-handoff-contact-action:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}


.zu-handoff-contact-actions[aria-busy="true"] .zu-handoff-contact-action { cursor: wait; }

.zu-handoff-contact-feedback {
  margin: 0;
  padding: 9px 11px;
  border-radius: 9px;
  background: #edf7f0;
  color: #1f6238;
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.4;
}

.zu-handoff-contact-feedback[data-state="error"],
.zu-handoff-contact-feedback[data-state="rate_limit"] {
  background: #fff2f0;
  color: #8f1727;
}

.zu-handoff-contact-feedback[data-state="pending"],
.zu-handoff-contact-feedback[data-state="recorded"] {
  background: #f2f5f8;
  color: #3f5264;
}

/* CTA buttons enter with a short opacity + rise and a small stagger. They are
   interactive from the first frame; motion is presentation only. */
.zu-handoff-contact-action {
  animation: zuPfCtaIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.zu-handoff-contact-action:nth-child(2) { animation-delay: 45ms; }
.zu-handoff-contact-action:nth-child(3) { animation-delay: 90ms; }
.zu-handoff-contact-action:nth-child(4) { animation-delay: 135ms; }

@keyframes zuPfCtaIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* The floating duo: two chat-style rows anchored bottom right, bubble on
   the left pointing toward the portrait. Each portrait keeps its 1.25x
   growth headroom so selection never shifts the layout around it. */
.zu-pf-duo {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.zu-pf-pro {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  max-width: 100%;
}

.zu-pf-bubble {
  margin: 0;
  position: relative;
  max-width: 230px;
  padding: 8px 12px;
  border: 1px solid rgba(226, 216, 208, 0.9);
  border-radius: 14px;
  border-bottom-right-radius: 5px;
  background: rgba(255, 253, 250, 0.96);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(27, 30, 34, 0.12);
  color: #3d3831;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
  text-align: right;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.zu-pf-bubble-who {
  display: block;
  margin-bottom: 1px;
  color: #1b1e22;
  font-family: 'Sora', 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.zu-pf-bubble-who[hidden] { display: none; }

.zu-pf-bubble-line { display: block; }

.zu-pf-bubble::after {
  content: "";
  position: absolute;
  right: -5px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 1px solid rgba(226, 216, 208, 0.9);
  border-top: 1px solid rgba(226, 216, 208, 0.9);
  background: rgba(255, 253, 250, 0.96);
  transform: translateY(-50%) rotate(45deg);
}

/* Bubbles fade in a beat after the portraits land, so the homeowner reads
   the report first and then gets the invitation. */
.zu-pf-bubble {
  opacity: 0;
  visibility: hidden;
}

.zu-handoff--bubbles:not(.zu-handoff--expanded) .zu-pf-bubble {
  opacity: 1;
  visibility: visible;
}

.zu-handoff--expanded .zu-pf-bubble {
  opacity: 0;
  visibility: hidden;
}

/* Real button, not a decorated image: 64px hit area plus reserved headroom
   for the exact 1.25x selected scale, growing up from bottom center. */
.zu-pf-portrait {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 64px;
  height: 82px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 999px;
}

.zu-pf-avatar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  overflow: hidden;
  border: 3px solid #fff;
  border-radius: 999px;
  background: #eee8e1;
  box-shadow: 0 0 0 1px #e2d8d0, 0 6px 18px rgba(27, 30, 34, 0.16);
  transform-origin: bottom center;
  transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.26s ease, opacity 0.2s ease, filter 0.2s ease;
}

.zu-pf-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.zu-pf-avatar img[hidden] { display: none; }

.zu-pf-initials {
  color: #7a2940;
  font-family: 'Sora', 'Inter', sans-serif;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.zu-pf-initials[hidden] { display: none; }

/* Green matched-and-available ring: calm, no pulsing, backed by the text
   cue below the portrait so color is never the only signal. */
.zu-pf-pro--matched .zu-pf-avatar {
  box-shadow: 0 0 0 1px #fff, 0 0 0 4px #1c6b5a, 0 0 16px rgba(28, 107, 90, 0.28), 0 6px 18px rgba(27, 30, 34, 0.16);
}

.zu-pf-pro--unavailable .zu-pf-avatar {
  opacity: 0.72;
  filter: grayscale(0.5);
}

.zu-pf-pro--selected .zu-pf-avatar {
  transform: scale(1.25);
}

.zu-pf-pro--receded .zu-pf-avatar {
  transform: scale(0.94);
  opacity: 0.78;
  filter: saturate(0.85);
}

/* Minimized chip: the footer collapses to a small restore pill, staying in
   the bottom-right anchor. */
.zu-pf-restore {
  float: right;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 7px 14px 7px 9px;
  border: 1px solid rgba(226, 216, 208, 0.9);
  border-radius: 999px;
  background: rgba(255, 253, 250, 0.96);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(27, 30, 34, 0.16);
  color: #3d3831;
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

.zu-pf-restore[hidden] { display: none !important; }

.zu-pf-restore-faces { display: flex; align-items: center; }

.zu-pf-restore-face {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  overflow: hidden;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #eee8e1 center / cover no-repeat;
  box-shadow: 0 0 0 1px #1c6b5a;
  color: #7a2940;
  font-size: 10px;
  font-weight: 800;
}

.zu-pf-restore-face + .zu-pf-restore-face { margin-left: -8px; }

@media (max-width: 700px) {
  .zu-handoff {
    right: max(8px, env(safe-area-inset-right, 0px));
    bottom: calc(var(--zoned-consent-clearance, 0px) + max(8px, env(safe-area-inset-bottom, 0px)));
    width: min(400px, calc(100vw - 16px));
  }

  body.zu-handoff-visible {
    --zoned-page-bottom-reserve: 208px;
  }

  body.zu-handoff-visible.zu-handoff-min {
    --zoned-page-bottom-reserve: 72px;
  }

  .zu-handoff-card {
    max-height: calc(100vh - var(--zoned-consent-clearance, 0px) - 220px);
    max-height: calc(100dvh - var(--zoned-consent-clearance, 0px) - 220px);
    padding: 14px 15px;
    border-radius: 16px;
  }

  .zu-pf-portrait { width: 58px; height: 74px; }
  .zu-pf-avatar { width: 56px; height: 56px; }
  .zu-pf-initials { font-size: 17px; }
  .zu-pf-bubble { max-width: min(220px, 58vw); }
}

@media (max-width: 380px) {
  .zu-pf-bubble { max-width: 52vw; font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .zu-report-demo .zi-demo-lot { stroke-dashoffset: 0; animation: none; }
  .zu-report-demo .zi-demo-bld,
  .zu-report-demo .zi-demo-env,
  .zu-report-demo .zi-demo-chip,
  .zu-report-demo .zi-demo-label { opacity: 1; transform: none; animation: none; }
  .zu-report-demo .zi-demo-typing {
    width: var(--type-end-width, 100%) !important;
    opacity: 1;
    border-right-color: transparent;
    animation: none;
  }
  .zu-reveal { animation: none; }
  .zu-continue-btn,
  .zu-back-btn,
  .zu-goal-card,
  .zu-goal-check,
  .zu-goal-check svg,
  .zu-handoff-card,
  .zu-handoff-contact-action,
  .zu-pf-avatar,
  .zu-pf-bubble,
  .zu-pf-min { animation: none; transition: none; }
  .zu-handoff-contact-action:hover:not(:disabled),
  .zu-continue-btn:hover { transform: none; }
}
