.lead-story .lead4-controls[hidden] { display: none !important; }
.lead-story .lead4-controls:not([hidden]) { display: flex; }
.lead-story[data-reduced-motion="true"] .lead4-controls { display: none !important; }
.lead-story .story-stage { display: block; }
.lead4-caption,
.lead4-disclosure { position: absolute; z-index: 5; left: 32px; margin: 0; color: #41413D; }
.lead4-caption { top: 16px; font-size: 14px; font-weight: 560; line-height: 20px; }
.lead4-disclosure { top: 532px; color: #62625D; font-size: 12px; line-height: 16px; }
.lead4-browser { position: absolute; top: 48px; left: 32px; width: 672px; height: 472px; overflow: hidden; border: 1px solid #E8E8E5; border-radius: 24px; background: #fff; box-shadow: 0 16px 40px rgba(35,33,24,.12); color: #171717; }
.lead4-chrome { display: flex; height: 32px; align-items: center; gap: 14px; padding: 0 13px; border-bottom: 1px solid #EDEDEA; background: #FAFAF8; color: #62625D; font-size: 12px; line-height: 20px; }
.lead4-window-dots { display: flex; gap: 5px; }
.lead4-window-dots i { width: 7px; height: 7px; border-radius: 50%; background: #D8D8D3; }
.lead4-aperture { position: relative; width: 100%; height: 440px; overflow: hidden; background: #fff; }
.lead4-customer,
.lead-owner { position: absolute; inset: 0; background: #fff; }
.lead-story:not([data-enhanced]) .lead4-customer { display: none; }
.lead-story:not([data-enhanced]) .lead-owner { display: block; }
.lead-story:not([data-enhanced]) .lead4-detail-scroll { height: auto; overflow: visible; transform: translateY(-300px); }
.lead-story .visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.lead4-chat-head { display: flex; height: 44px; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid #EDEDEA; }
.lead4-chat-head img { width: 36px; height: 28px; flex: none; object-fit: contain; }
.lead4-chat-head > span { display: grid; gap: 1px; }
.lead4-chat-head b { font-size: 14px; font-weight: 560; line-height: 18px; }
.lead4-chat-head small { color: #62625D; font-size: 12px; line-height: 16px; }
.lead4-transcript { display: flex; height: 292px; flex-direction: column; justify-content: center; gap: 8px; padding: 8px 24px; overflow: hidden; }
.lead4-bubble { display: grid; width: fit-content; max-width: 600px; gap: 4px; padding: 7px 12px; border-radius: 20px; opacity: 0; transform: translateY(5px); }
.lead4-bubble[data-visible="true"] { opacity: 1; transform: translateY(0); }
.lead4-thinking { display: none; align-items: center; gap: 5px; align-self: flex-start; padding: 8px 12px; border-radius: 18px; background: #F0F0EC; color: #62625D; font-size: 12px; line-height: 16px; }
.lead4-thinking[data-visible="true"] { display: flex; }
.lead4-thinking > span { margin-right: 4px; }
.lead4-thinking > i { width: 5px; height: 5px; border-radius: 50%; background: #73736D; }
.lead4-bubble.lead4-buyer { align-self: flex-end; background: #4265EE; color: #fff; }
.lead4-bubble.lead4-answer { align-self: flex-start; background: #F0F0EC; color: #171717; }
.lead4-meta { display: flex; justify-content: space-between; gap: 18px; font-size: 12px; line-height: 16px; }
.lead4-meta b { font-weight: 560; }
.lead4-meta time { flex: none; opacity: .76; }
.lead4-bubble p { margin: 0; font-size: 18px; line-height: 26px; overflow-wrap: anywhere; }
.lead4-composer { display: flex; height: 64px; align-items: center; gap: 2px; margin: 12px 16px 16px; padding: 7px 8px 7px 18px; border: 1px solid #E6E6E6; border-radius: 999px; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.04); color: #62625D; font-size: 16px; line-height: 24px; }
.lead4-composer[data-focused="true"] { border-color: #B8B8B0; }
.lead4-input { min-width: 0; overflow: hidden; text-overflow: clip; white-space: nowrap; }
.lead4-caret { width: 1px; height: 18px; flex: none; background: #171717; opacity: 0; }
.lead4-caret[data-visible="true"] { opacity: 1; animation: lead4-caret-blink 1s steps(2, start) infinite; }
.lead-story[data-state="paused"] .lead4-caret { animation-play-state: paused; }
@keyframes lead4-caret-blink { 50% { opacity: 0; } }
.lead4-send { display: grid; width: 46px; height: 46px; flex: none; place-items: center; margin-left: auto; border-radius: 50%; background: #171717; color: #fff; font-size: 22px; line-height: 1; }
.lead-story[data-enhanced] .lead4-customer,
.lead-story[data-enhanced] .lead-owner { display: block; }
.lead-story[data-lead4-context="buyer"] .lead4-customer { opacity: 1; transform: translateX(0); }
.lead-story[data-lead4-context="buyer"] .lead-owner { opacity: 0; transform: translateX(24px); pointer-events: none; }
.lead-story[data-lead4-context="owner"] .lead4-customer { opacity: 0; transform: translateX(-32px); pointer-events: none; }
.lead-story[data-lead4-context="owner"] .lead-owner { opacity: 1; transform: translateX(0); }
.lead4-owner-canvas { position: relative; display: flex; width: 964px; height: 440px; align-items: flex-start; gap: 24px; padding: 20px 32px; transform: translateX(0); }
.lead-story[data-lead4-camera="detail"] .lead4-owner-canvas { transform: translateX(-364px); }
.lead4-list-pane { width: 340px; flex: none; }
.lead4-list-head { margin: 0 0 14px; }
.lead4-eyebrow { margin: 0 0 3px; color: #62625D; font-size: 11px; line-height: 16px; }
.lead4-list-head h3 { margin: 0; font-size: 22px; font-weight: 560; line-height: 28px; letter-spacing: -.35px; }
.lead4-list-context { margin: 8px 0; color: #62625D; font-size: 12px; line-height: 18px; }
.lead4-export { display: inline-flex; align-items: center; padding: 7px 12px; border: 1px solid #EDEDEA; border-radius: 999px; font-size: 12px; line-height: 18px; }
.lead4-list-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; color: #62625D; font-size: 12px; line-height: 18px; }
.lead4-list-filters p { width: 100%; margin: 0; }
.lead4-list-filters > span { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border: 1px solid #EDEDEA; border-radius: 999px; }
.lead4-list-filters i { display: grid; width: 14px; height: 14px; place-items: center; border-radius: 3px; background: #171717; color: #fff; font-size: 10px; font-style: normal; }
.lead4-list-filters .status-new { color: #004F99; background: #E5F3FF; }
.lead4-list-filters .status-in_progress { color: #6E5400; background: #FFF6D9; }
.lead4-list-filters .status-won { color: #126B3F; background: #E8F7EE; }
.lead4-list-filters .status-lost { color: #A12A2A; background: #FDECEC; }
.lead-owner .lead-list { display: block; padding: 0; overflow: hidden; border-top: 1px solid #EDEDEA; }
.lead-owner .lead-list-item { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; align-items: center; gap: 8px 12px; width: 100%; min-height: 112px; padding: 16px 12px; border: 0; border-bottom: 1px solid #EDEDEA; background: transparent; color: #171717; text-align: left; }
.lead-owner .lead-list-item[aria-pressed="true"] { background: #FAFAF8; box-shadow: inset 2px 0 0 #171717; }
.lead-owner .lead-status { width: fit-content; margin: 0; padding: 4px 8px; border-radius: 999px; background: #F0F0EC; color: #62625D; font-size: 11px; font-weight: 560; line-height: 16px; }
.lead-owner .lead-list-main { display: grid; grid-column: 1 / -1; grid-row: 2; gap: 3px; min-width: 0; }
.lead-owner .lead-list-main strong { font-size: 16px; font-weight: 560; line-height: 22px; }
.lead-owner .lead-list-main > span { overflow: hidden; color: #62625D; font-size: 12px; line-height: 18px; text-overflow: ellipsis; white-space: nowrap; }
.lead-owner .lead-list-meta { display: flex; grid-column: 2; grid-row: 1; justify-self: end; color: #62625D; font-size: 12px; line-height: 16px; }
.lead4-detail-window { display: none; width: 600px; height: 440px; flex: none; overflow: hidden; }
.lead-story[data-lead4-camera="detail"] .lead4-detail-window { display: block; }
.lead4-detail-scroll { width: 600px; height: 440px; overflow: hidden; scrollbar-width: none; }
.lead4-detail-scroll::-webkit-scrollbar { display: none; }
.lead-owner .lead-detail { position: relative; width: 600px; min-height: 0; margin: 0; padding: 20px 24px 136px; overflow: visible; border: 1px solid #EDEDEA; border-radius: 16px; background: #fff; box-shadow: 0 4px 18px rgba(23,23,23,.06); color: #171717; }
.lead-owner .lead-detail-close { position: absolute; top: 16px; right: 16px; display: grid; width: 32px; height: 32px; place-items: center; border-radius: 50%; background: #171717; color: #fff; font-size: 22px; line-height: 1; }
.lead-owner .lead-detail > .eyebrow { margin: 0 0 8px; color: #62625D; font-size: 12px; line-height: 18px; }
.lead-owner .lead-detail-title h2 { margin: 0 0 8px; font-size: 24px; font-weight: 560; line-height: 30px; letter-spacing: -.4px; }
.lead-owner .lead-detail > .lead-status { margin-bottom: 0; }
.lead-owner .lead-stage { display:grid;gap:8px;margin:16px 0 20px;padding:16px;border:1px solid #EDEDEA;border-radius:16px;background:#F7F7F4;color:#62625D; }
.lead-owner .lead-stage > span { display:block;margin:0;color:#62625D;font-size:12px;line-height:18px; }
.lead-owner .lead-stage > div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.lead-owner .lead-stage > div .lead-stage-option { display:grid;min-height:40px;place-items:center;padding:8px 12px;border:1px solid #EDEDEA;border-radius:12px;font-size:13px;line-height:20px; }
.lead-owner .lead-stage-option.status-in_progress { color: #6E5400; background: #FFF6D9; }
.lead-owner .lead-stage-option.status-won { color: #427D2C; background: #F0F5ED; }
.lead-owner .lead-stage-option.status-lost { color: #B54747; background: #FBEEEE; }
.lead-owner .lead-stage > small { display:block;margin:0;color:#62625D;font-size:12px;line-height:18px; }
.lead-owner .avito-chat-button { display: flex; min-height: 40px; align-items: center; justify-content: center; gap: 8px; margin: 0; border: 1px solid #EDEDEA; border-radius: 12px; background: #F0F0EC; color: #41413D; font-size: 12px; line-height: 18px; }
.lead-owner .lead4-fields { display: grid; gap: 12px; margin: 16px 0 0; }
.lead-owner .lead4-fields > div { padding-top: 10px; border-top: 1px solid #EDEDEA; }
.lead-owner .lead4-fields dt { color: #62625D; font-size: 12px; line-height: 18px; }
.lead-owner .lead4-fields dd { margin: 3px 0 0; color: #171717; font-size: 16px; line-height: 23px; overflow-wrap: anywhere; }
.lead-owner .lead4-history { margin-top: 18px; padding: 14px 0 0; border-top: 1px solid #EDEDEA; }
.lead-owner .lead4-history > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 10px; }
.lead-owner .lead4-history .eyebrow { margin: 0; color: #62625D; font-size: 12px; line-height: 18px; }
.lead-owner .lead4-history > div:first-child > span { display: grid; min-width: 24px; height: 24px; place-items: center; border-radius: 50%; background: #F0F0EC; color: #41413D; font-size: 11px; }
.lead-owner .lead4-history article { display: grid; grid-template-columns: 12px 1fr; gap: 8px; padding: 4px 0; }
.lead-owner .lead4-history article > i { width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: #73736D; }
.lead-owner .lead4-history article time { display: block; color: #62625D; font-size: 11px; line-height: 16px; }
.lead-owner .lead4-history article b { display: block; margin-top: 2px; font-size: 13px; font-weight: 560; line-height: 18px; }
.lead-owner .lead4-history article p { margin: 3px 0 0; color: #62625D; font-size: 12px; line-height: 18px; }
.lead4-click-halo { position: absolute; z-index: 3; top: 0; left: 0; width: 20px; height: 20px; border: 1px solid rgba(23,23,23,.42); border-radius: 50%; opacity: 0; pointer-events: none; }
.lead4-pointer { position: absolute; z-index: 4; top: 0; left: 0; width: 26px; height: 30px; opacity: 0; pointer-events: none; }
.lead4-pointer[data-visible="true"] { opacity: 1; }
.lead-story[data-motion-ready="false"] .lead4-pointer,
.lead-story[data-reduced-motion="true"] .lead4-pointer { display: none; }
@media (prefers-reduced-motion: reduce) {
  .lead-story[data-enhanced] .lead4-customer,
  .lead-story[data-enhanced] .lead-owner,
  .lead4-owner-canvas,
  .lead4-bubble,
  .lead4-caret { transition: none !important; animation: none !important; }
}

/* Source-shaped cabinet workplanes; one persistent browser and bounded camera. */
.lead-story .story-stage { display:block;padding:0; }
.lead-story .lead4-owner-canvas { transform:translateX(-364px); }
.lead-story .lead4-detail-window { display:block; }
.lead-story .lead4-detail-scroll { height:440px;overflow:hidden; }
.lead-story:not([data-enhanced]) .lead4-detail-scroll { transform:none; }
.lead-story:not([data-enhanced]) .lead-detail, .lead-story[data-state="static"] .lead-detail { transform:translateY(-316px); }
.lead-story .lead-owner .lead-status.status-new { color:var(--lead-new);background:var(--lead-new-bg); }
.lead-story .lead-owner .lead-status.status-in_progress { color:var(--lead-progress);background:var(--lead-progress-bg); }
.lead-story .lead-owner .lead-stage-option.active { border-color:#A17C00;box-shadow:0 0 0 1px #A17C00; }
.lead-story .lead4-pointer { opacity:0; }
.lead-story .lead4-controls[hidden] { display:none!important; }
.lead-story .lead4-controls button { min-height:44px; }
.lead-story .lead4-controls button:focus-visible { outline:2px solid #4265EE;outline-offset:3px; }
.lead-story.story-row[data-story="lead"] .lead-owner .lead-stage { gap:8px;margin:16px 0 20px;padding:16px; }
.lead-story .lead-owner .lead-stage > div .lead-stage-option { min-height:40px;padding:8px 12px;border-radius:12px; }


@media (max-width: 1000px) {
  .lead-story .story-stage { width:100%; height:480px; min-height:420px; padding:0; }
  .lead-story .lead4-caption { top:8px; left:10px; right:10px; font-size:12px; line-height:16px; }
  .lead-story .lead4-browser { top:32px; left:8px; width:calc(100% - 16px); height:386px; border-radius:16px; }
  .lead-story .lead4-chrome { height:30px; gap:8px; padding-inline:9px; font-size:11px; }
  .lead-story .lead4-aperture { position:relative; height:354px; overflow:hidden; }
  .lead-story .lead4-owner-canvas { position:relative; display:block; width:100%; height:100%; min-height:0; padding:0; overflow:hidden; transform:none!important; }
  .lead-story .lead4-list-pane { position:absolute; inset:0; width:100%; height:100%; min-width:0; overflow:auto; }
  .lead-story .lead4-detail-window { position:absolute; inset:0; width:100%; height:100%; min-width:0; overflow:hidden; }
  .lead-story[data-mobile-card="true"] .lead4-list-pane,
  .lead-story[data-mobile-card="false"] .lead4-detail-window { display:none!important; }
  .lead-story .lead4-detail-scroll { width:100%; height:100%; min-width:0; overflow:auto; scrollbar-width:thin; }
  .lead-story .lead-owner .lead-detail { width:100%; min-height:100%; padding:12px 12px 20px; transform:none!important; }
  .lead-story .lead-owner .lead-detail-title h2 { font-size:20px; line-height:26px; }
  .lead-story .lead-owner .lead-stage { margin:10px 0; padding:10px; }
  .lead-story .lead-owner .lead-stage > div { grid-template-columns:repeat(3,minmax(0,1fr)); gap:4px; }
  .lead-story .lead-owner .lead-stage-option { padding:6px 4px; font-size:12px; }
  .lead-story .lead4-disclosure { top:auto; bottom:8px; left:10px; right:10px; font-size:11px; line-height:14px; }
  .lead-story .lead4-controls { width:100%; }
}

/* Approved cabinet semantic palette for the lead demonstration. */
.lead-story { --lead-new:#1D4ED8; --lead-new-bg:#EFF6FF; --lead-progress:#92400E; --lead-progress-bg:#FFFBEB; --lead-won:#15803D; --lead-won-bg:#F0FDF4; --lead-lost:#B91C1C; --lead-lost-bg:#FEF2F2; --lead-new-dot:#2563EB; --lead-progress-dot:#D97706; --lead-won-dot:#16A34A; --lead-lost-dot:#EF4444; }
.lead-story .status-new,.lead-story .lead-status.status-new,.lead-story .lead-stage-option.status-new { color:var(--lead-new);background:var(--lead-new-bg); }
.lead-story .status-in_progress,.lead-story .lead-status.status-in_progress,.lead-story .lead-stage-option.status-in_progress { color:var(--lead-progress);background:var(--lead-progress-bg); }
.lead-story .status-won,.lead-story .lead-status.status-won,.lead-story .lead-stage-option.status-won { color:var(--lead-won);background:var(--lead-won-bg); }
.lead-story .status-lost,.lead-story .lead-status.status-lost,.lead-story .lead-stage-option.status-lost { color:var(--lead-lost);background:var(--lead-lost-bg); }
.lead-story .status-new i { background:var(--lead-new-dot); }.lead-story .status-in_progress i { background:var(--lead-progress-dot); }.lead-story .status-won i { background:var(--lead-won-dot); }.lead-story .status-lost i { background:var(--lead-lost-dot); }
