/* ================================================================
   The live console demo (business page, #demo).
   Builds on the console mock's classes in site.css (.browser, .crm-app,
   .crm-side, .kpis, .panel, .lead-row, .chart); everything below is what
   the working version adds: the interactive nav, the views, the toast and
   the guided tour.
   ================================================================ */
.demo-head { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 56px; align-items: end; margin-bottom: 30px; }
.demo-head .h2 { margin-bottom: 0; }
.demo-intro .lead { margin-bottom: 10px; }
.demo-intro p { margin: 0; color: var(--text-secondary); font-size: 15.5px; line-height: 1.55; }
.demo-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.demo-points { margin-top: 34px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; padding: 0; list-style: none; }

.demo-stage { position: relative; overflow: hidden; }
.demo-live { height: 620px; min-height: 0; }
.demo-live .crm-side { display: block; overflow-y: auto; }
.demo-live .crm-main { overflow-y: auto; scroll-behavior: auto; }
.demo-live .crm-main > * + * { margin-top: 14px; }
.demo-live button { font: inherit; }

/* ---- sidebar ---- */
.demo-live .crm-biz .ty { display: flex; align-items: center; gap: 6px; }
.demo-live .crm-nav button {
  display: flex; align-items: center; gap: 11px; width: 100%; padding: 9px 11px; border: 0; border-radius: var(--radius-md);
  background: none; color: var(--text-secondary); font-size: 14px; font-weight: 500; text-align: left; cursor: pointer; min-height: 44px;
}
.demo-live .crm-nav button:hover { background: var(--surface-2); color: var(--text); }
.demo-live .crm-nav button svg { width: 17px; height: 17px; flex-shrink: 0; }
.demo-live .crm-nav button[aria-current="page"] { background: var(--surface-3); color: var(--text); }
.demo-live .crm-nav button[aria-current="page"] svg { color: var(--red); }
.demo-live .crm-nav button:focus-visible, .demo-live .demo-btn:focus-visible, .demo-live .chip:focus-visible, .demo-live .inq:focus-visible, .demo-live .plan-card button:focus-visible {
  outline: 2px solid var(--orange-text); outline-offset: 2px;
}
.nav-count { margin-left: auto; min-width: 22px; padding: 1px 6px; border-radius: var(--radius-pill); background: var(--red-text); color: #fff; font-family: var(--font-mono); font-size: 11.5px; text-align: center; }

/* ---- header of a view ---- */
.demo-live .crm-h { margin-bottom: 0; gap: 12px; flex-wrap: wrap; }
.demo-pill svg { width: 12px; height: 12px; }
.demo-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--radius-pill); background: #FFF1D6; color: #7A4300; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.04em; }
.crm-h .demo-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---- buttons inside the demo ---- */
.demo-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 15px; border-radius: var(--radius-pill); border: var(--border-hairline) solid var(--border); background: var(--surface-1); color: var(--text); font-size: 14px; font-weight: 600; cursor: pointer; min-height: 42px; }
.demo-btn:hover { background: var(--surface-2); }
.demo-btn.primary { background: var(--grad-cta); border-color: transparent; color: #fff; }
.demo-btn.primary:hover { filter: brightness(1.05); }
.demo-btn svg { width: 15px; height: 15px; }
.demo-btn[disabled], .demo-btn[aria-disabled="true"] { opacity: 0.5; cursor: default; }

/* ---- dashboard ---- */
.kpi .delta.new { color: var(--text-secondary); }
.demo-live .chart { height: 110px; gap: 3px; }
.demo-live .chart .bar:hover { opacity: 1; }
.findings-list { margin: 0; padding-left: 18px; font-size: 13.5px; line-height: 1.55; color: var(--text-secondary); }
.upsell { text-align: center; padding: 34px 22px; }
.upsell h3 { font-family: var(--font-sans); font-size: 18px; margin: 10px 0 12px; letter-spacing: -0.2px; }
.upsell ul { list-style: none; margin: 0 auto 20px; padding: 0; max-width: 380px; text-align: left; font-size: 14px; color: var(--text-secondary); display: grid; gap: 8px; }
.upsell li { display: flex; gap: 9px; align-items: flex-start; }
.upsell li svg { width: 15px; height: 15px; color: var(--green-text); flex-shrink: 0; margin-top: 3px; }
.upsell .demo-pill { margin-bottom: 4px; }

/* ---- leads ---- */
.inbox { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 14px; align-items: start; }
.inq-list { padding: 6px 14px; }
.inq { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 6px; border: 0; border-bottom: var(--border-hairline) solid var(--border); background: none; text-align: left; cursor: pointer; border-radius: 0; color: inherit; }
.inq:last-child { border-bottom: 0; }
.inq:hover { background: var(--surface-2); }
.inq[aria-current="true"] { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--red); }
.inq .av, .inq-head .av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; }
.inq .av svg, .inq-head .av svg { width: 15px; height: 15px; }
.inq .lt { flex: 1; min-width: 0; }
.inq .lt b { display: block; font-size: 14px; font-weight: 600; }
.inq .lt span { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-secondary); }
.badge-s { flex-shrink: 0; padding: 3px 8px; border-radius: var(--radius-pill); font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.05em; background: var(--surface-3); color: var(--text-secondary); }
.badge-s.s-new { background: #FFE6E3; color: #B3261E; }
.badge-s.s-accepted { background: #DDF5E3; color: #146C2E; }
.badge-s.s-answered { background: #DCEFFB; color: #0B5A86; }
.inq-detail { padding: 18px; }
.inq-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.inq-head .lt { flex: 1; min-width: 0; }
.inq-head b { display: block; font-size: 15.5px; }
.inq-head span.m { font-family: var(--font-mono); font-size: 12px; color: var(--text-secondary); }
.inq-msg { margin: 0 0 14px; padding: 12px 14px; border-radius: var(--radius-lg); background: var(--surface-2); font-size: 14.5px; line-height: 1.55; }
.inq-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.inq-note { margin: 12px 0 0; font-size: 13px; line-height: 1.5; color: var(--text-secondary); }
/* Same pair as .s-accepted: 5.68:1. One banner for every outcome (accepted, declined, not a lead, answered). */
.inq-result { margin: 12px 0 0; padding: 10px 12px; border-radius: var(--radius-md); background: #DDF5E3; color: #146C2E; font-size: 13px; font-weight: 600; }
.strip { padding: 11px 14px; border-radius: var(--radius-lg); background: #FFF1D6; color: #6E3D00; font-size: 13px; line-height: 1.5; }

/* ---- profile ---- */
.pf-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.pf-hours label { display: grid; grid-template-columns: 112px 1fr; gap: 10px; align-items: center; padding: 6px 0; font-size: 14px; }
.pf-name input, .pf-hours input { width: 100%; padding: 8px 10px; border: var(--border-hairline) solid var(--border); border-radius: var(--radius-md); background: var(--surface-1); color: var(--text); font: inherit; font-size: 13px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: var(--radius-pill); border: var(--border-hairline) solid var(--border); background: var(--surface-1); color: var(--text-secondary); font-size: 14px; font-weight: 500; cursor: pointer; min-height: 42px; }
.chip svg { width: 14px; height: 14px; }
.chip[aria-pressed="true"], .chip.own { background: var(--fill-red-soft); border-color: var(--red); color: var(--text); }
.chip[aria-pressed="true"] svg, .chip.own svg { color: var(--red); }
.pf-note { margin: 8px 0 0; min-height: 1.4em; font-size: 12.5px; color: var(--text-secondary); }
.pf-name input { margin-top: 2px; }
.tag-add { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tag-add input { flex: 1 1 100%; min-width: 0; padding: 8px 10px; border: var(--border-hairline) solid var(--border); border-radius: var(--radius-md); background: var(--surface-1); color: var(--text); font: inherit; font-size: 13px; }
.pf-hint { margin: 10px 0 0; font-size: 12.5px; color: var(--text-secondary); }
.pf-count { margin: 12px 0 0; font-family: var(--font-mono); font-size: 12px; color: var(--text-secondary); }

/* ---- posts ---- */
.post-form { display: grid; gap: 10px; }
.post-form input, .post-form textarea { width: 100%; padding: 9px 11px; border: var(--border-hairline) solid var(--border); border-radius: var(--radius-md); background: var(--surface-1); color: var(--text); font: inherit; font-size: 13.5px; }
.post-form textarea { min-height: 76px; resize: vertical; }
.post-form label { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-tertiary); }
.post-item { padding: 12px 0; border-bottom: var(--border-hairline) solid var(--border); }
.post-item:last-child { border-bottom: 0; }
.post-item b { display: block; font-size: 14px; }
.post-item p { margin: 3px 0 6px; font-size: 13.5px; color: var(--text-secondary); }
.post-item .m { font-family: var(--font-mono); font-size: 12px; color: var(--text-secondary); }
.post-empty { margin: 0; font-size: 13px; color: var(--text-secondary); }

/* ---- billing ---- */
.plan-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.plan-card { position: relative; padding: 16px; border: var(--border-hairline) solid var(--border); border-radius: var(--radius-lg); background: var(--surface-1); display: flex; flex-direction: column; gap: 10px; }
.plan-card.on { border-color: var(--red); box-shadow: 0 0 0 1px var(--red); }
.plan-card h4 { margin: 0; font-family: var(--font-sans); font-size: 15px; }
.plan-card .pr { font-family: var(--font-display); font-weight: 800; font-size: 24px; letter-spacing: -0.8px; line-height: 1; }
.plan-card .pr small { font-family: var(--font-sans); font-weight: 500; font-size: 12px; color: var(--text-secondary); letter-spacing: 0; }
.plan-card ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 13.5px; color: var(--text-secondary); flex: 1; }
.plan-card li { display: flex; gap: 7px; align-items: flex-start; }
.plan-card li svg { width: 14px; height: 14px; margin-top: 2px; color: var(--green-text); flex-shrink: 0; }
.plan-card .cur { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.06em; color: var(--red-text); }
.usage { display: grid; gap: 0; }
.usage .row { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: var(--border-hairline) solid var(--border); font-size: 14px; }
.usage .row:last-child { border-bottom: 0; }
.usage .row span:last-child { font-family: var(--font-mono); }
.demo-fine { margin: 0; font-size: 12.5px; color: var(--text-secondary); }

/* ---- toast ---- */
.demo-toast { position: absolute; left: 50%; bottom: 16px; z-index: 4; transform: translateX(-50%); max-width: calc(100% - 32px); padding: 10px 16px; border-radius: var(--radius-pill); background: #17171a; color: #fff; font-size: 12.5px; box-shadow: var(--shadow-pop); transition: opacity var(--dur-base), transform var(--dur-base); }
.demo-toast[hidden] { display: none; }

/* ---- guided tour ---- */
.tour-layer { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.tour-dim { position: absolute; inset: 0; background: rgba(15, 15, 18, 0.52); }
.tour-spot { position: absolute; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(15, 15, 18, 0.52), 0 0 0 3px var(--orange); transition: left 0.25s var(--ease-standard), top 0.25s var(--ease-standard), width 0.25s var(--ease-standard), height 0.25s var(--ease-standard); }
.tour-layer [hidden] { display: none; }
.tour-card { position: absolute; width: min(340px, calc(100% - 24px)); padding: 18px; border-radius: var(--radius-xl); background: #fff; color: #17171a; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35); pointer-events: auto; transition: left 0.25s var(--ease-standard), top 0.25s var(--ease-standard); }
.tour-card.dock { left: 8px !important; right: 8px; bottom: 8px; top: auto !important; width: auto; }
.tour-card .tc-step { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--orange-text); }
.tour-card h4 { margin: 6px 0 6px; font-family: var(--font-sans); font-size: 16px; letter-spacing: -0.2px; }
.tour-card p { margin: 0; font-size: 14.5px; line-height: 1.5; color: #4a4a52; }
.tour-card .tc-hint { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 8px 10px; border-radius: var(--radius-md); background: #FFF3E0; color: #7a4300; font-size: 13.5px; font-weight: 600; }
.tour-card .tc-hint svg { width: 14px; height: 14px; flex-shrink: 0; }
.tour-card .tc-hint.done { background: #E3F7E8; color: #146c2e; }
.tc-bars { display: flex; gap: 4px; margin: 14px 0 12px; }
.tc-bars i { flex: 1; height: 3px; border-radius: 3px; background: #E4E4E8; }
.tc-bars i.on { background: var(--orange); }
.tc-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.tc-row .skip { border: 0; background: none; padding: 6px 0; color: #6a6a72; font-size: 13.5px; cursor: pointer; text-decoration: underline; min-height: 36px; }
.tc-row .btns { display: flex; gap: 8px; margin-left: auto; }
.tour-card .demo-btn { background: #fff; color: #17171a; border-color: #d8d8dc; }
.tour-card .demo-btn.primary { background: var(--grad-cta); color: #fff; border-color: transparent; }
.tour-card a.demo-btn { text-decoration: none; }

/* ---- narrower windows ---- */
@media (max-width: 980px) {
  .demo-head { grid-template-columns: 1fr; align-items: start; }
  .demo-points { grid-template-columns: 1fr; }
  .inbox, .pf-grid { grid-template-columns: 1fr; }
  .plan-cards { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .demo-btn, .chip, .inq { min-height: 44px; }
  .demo-live { height: 640px; grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .demo-live .crm-side { padding: 10px; border-right: 0; border-bottom: var(--border-hairline) solid var(--border); }
  .demo-live .crm-biz { display: none; }
  .demo-live .crm-nav { flex-direction: row; overflow-x: auto; gap: 4px; }
  .demo-live .crm-nav button { width: auto; white-space: nowrap; padding: 8px 10px; }
  .demo-live .crm-main { padding: 14px; }
  .demo-live .kpis { grid-template-columns: 1fr; gap: 8px; }
  .demo-live .crm-panels { grid-template-columns: 1fr; }
  .pf-hours label { grid-template-columns: 1fr; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .tour-spot, .tour-card, .demo-toast { transition: none; }
}
