/* Live demo preview — Lexcore AppDev (own UI) */
.demo-honesty {
  display: flex; flex-direction: column; align-items: flex-start; gap: .35rem;
  margin: 0 0 1rem;
}
.demo-honesty-badge {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .35rem .7rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--maroon-soft);
  color: var(--gold-bright); font-size: .78rem; font-weight: 700;
}
.demo-honesty-note {
  margin: 0; color: var(--muted-2); font-size: .82rem; max-width: 52ch;
}

.live-demo {
  border: 1px solid var(--line);
  background: var(--bg-card);
  border-radius: 18px;
  padding: 1.15rem 1.2rem 1.35rem;
  box-shadow: 0 24px 50px rgba(0,0,0,.28);
}
.live-demo .demo-idea-label {
  display: block; color: var(--gold); font-size: .78rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; margin-bottom: .45rem;
}
.live-demo textarea {
  width: 100%; min-height: 72px; resize: vertical;
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 12px; padding: .75rem .85rem; color: var(--text);
  outline: none; line-height: 1.45;
}
.live-demo textarea:focus { border-color: rgba(255, 138, 61, .55); box-shadow: 0 0 0 3px rgba(255, 138, 61, .12); }
.demo-chip-row {
  display: flex; flex-wrap: wrap; gap: .45rem; margin: .75rem 0 1rem;
}
.demo-chip-row .chip { cursor: pointer; }

.demo-stage {
  display: grid; grid-template-columns: 1fr 280px; gap: 1.25rem;
  margin-top: 1.1rem; align-items: start;
}
.demo-rail {
  display: grid; gap: .75rem; min-width: 0;
}
.demo-progress-track {
  height: 8px; border-radius: 99px; background: #26262a; overflow: hidden;
}
.demo-progress-bar {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--maroon), var(--gold));
  border-radius: inherit;
  transition: width .35s ease;
}
.demo-log {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .8rem; color: #c9c9cf;
  background: #08080a; border: 1px solid var(--line);
  border-radius: 12px; padding: .75rem .85rem;
  min-height: 140px; max-height: 220px; overflow: auto;
}
.demo-log-line { margin: .2rem 0; opacity: .95; }

.demo-phone {
  width: 100%; max-width: 260px; margin: 0 auto;
  border-radius: 28px; border: 2px solid rgba(255, 138, 61, .35);
  background: #111113; overflow: hidden;
  box-shadow: 0 18px 40px rgba(0,0,0,.4);
  touch-action: pan-y;
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.demo-phone-bar {
  padding: .55rem .85rem; font-size: .72rem; color: var(--muted);
  border-bottom: 1px solid var(--line-soft);
  background: rgba(0,0,0,.2);
}
.demo-phone-body {
  padding: .9rem .85rem 1.1rem; min-height: 340px;
  display: grid; gap: .65rem; align-content: start;
}
.demo-phone-body h3 { margin: 0; font-size: 1.05rem; color: var(--gold-bright); }
.demo-phone-wait { color: var(--muted); text-align: center; margin-top: 6rem; }

.demo-block { }
.demo-hero {
  font-size: .95rem; color: var(--text); font-weight: 600; line-height: 1.35;
}
.demo-card {
  border: 1px solid var(--line); background: var(--bg-elev);
  border-radius: 12px; padding: .7rem .75rem;
  display: grid; gap: .5rem;
}
.demo-card-text { color: var(--muted); font-size: .88rem; }
.demo-inline-btn, .demo-phone-btn {
  border: 0; border-radius: 10px; padding: .55rem .75rem;
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  color: #111113; font-weight: 700; cursor: pointer; font-size: .85rem;
}
.demo-list ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.demo-list li {
  border: 1px solid var(--line-soft); border-radius: 10px;
  padding: .55rem .65rem; color: var(--muted); font-size: .86rem;
  background: rgba(255,255,255,.02);
}
.demo-chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.demo-mini-chip {
  border: 1px solid var(--line); border-radius: 999px;
  padding: .3rem .55rem; font-size: .75rem; color: var(--gold-bright);
  background: var(--maroon-soft);
}

/* Themes — always tinted (gold/maroon family). Never flat black/white. */
.demo-phone[data-theme="gold"] {
  --demo-accent: var(--gold);
  background: linear-gradient(180deg, #2a1618 0%, #1a1012 55%, #140c0e 100%);
  border-color: rgba(212, 168, 75, 0.45);
}
.demo-phone[data-theme="gold"] .demo-card {
  background: linear-gradient(145deg, rgba(155, 45, 58, 0.22), rgba(36, 20, 24, 0.95));
  border-color: rgba(212, 168, 75, 0.28);
}
.demo-phone[data-theme="blue"] {
  border-color: rgba(96, 165, 250, 0.45);
  background: linear-gradient(180deg, #152238 0%, #0f1724 60%, #0b1220 100%);
}
.demo-phone[data-theme="blue"] .demo-phone-body h3,
.demo-phone[data-theme="blue"] .demo-mini-chip { color: #93c5fd; }
.demo-phone[data-theme="blue"] .demo-inline-btn,
.demo-phone[data-theme="blue"] .demo-phone-btn {
  background: linear-gradient(135deg, #60a5fa, #2563eb); color: #f0f7ff;
}
.demo-phone[data-theme="blue"] .demo-card {
  background: rgba(37, 99, 235, 0.12); border-color: rgba(96, 165, 250, 0.28);
}
/* Warm cream + maroon (not pure white) */
.demo-phone[data-theme="light"],
.demo-phone[data-theme="cream"] {
  background: linear-gradient(180deg, #fff4e4 0%, #f3e0c4 100%);
  border-color: #c48a3a; color: #3a2218;
}
.demo-phone[data-theme="light"] .demo-phone-bar,
.demo-phone[data-theme="cream"] .demo-phone-bar {
  color: #7a4a28; background: linear-gradient(90deg, #f0d4a8, #e8c48a);
}
.demo-phone[data-theme="light"] .demo-phone-body h3,
.demo-phone[data-theme="cream"] .demo-phone-body h3 { color: #9b2d3a; }
.demo-phone[data-theme="light"] .demo-hero,
.demo-phone[data-theme="light"] .demo-card-text,
.demo-phone[data-theme="light"] .demo-list li,
.demo-phone[data-theme="cream"] .demo-hero,
.demo-phone[data-theme="cream"] .demo-card-text,
.demo-phone[data-theme="cream"] .demo-list li { color: #4a2e22; }
.demo-phone[data-theme="light"] .demo-card,
.demo-phone[data-theme="light"] .demo-list li,
.demo-phone[data-theme="cream"] .demo-card,
.demo-phone[data-theme="cream"] .demo-list li {
  background: #ffe9cc; border-color: #e0b86a;
}
.demo-phone[data-theme="light"] .demo-inline-btn,
.demo-phone[data-theme="light"] .demo-phone-btn,
.demo-phone[data-theme="cream"] .demo-inline-btn,
.demo-phone[data-theme="cream"] .demo-phone-btn {
  background: linear-gradient(135deg, #e8c36a, #9b2d3a); color: #fff8ee;
}
.demo-phone[data-theme="light"] .demo-mini-chip,
.demo-phone[data-theme="cream"] .demo-mini-chip {
  color: #9b2d3a; background: rgba(155, 45, 58, 0.12); border-color: rgba(155, 45, 58, 0.25);
}
/* Deep wine + gold (not pure black) */
.demo-phone[data-theme="dark"],
.demo-phone[data-theme="wine"] {
  background: linear-gradient(180deg, #3a1520 0%, #1c0c12 55%, #12080c 100%);
  border-color: rgba(232, 195, 106, 0.5);
}
.demo-phone[data-theme="dark"] .demo-phone-bar,
.demo-phone[data-theme="wine"] .demo-phone-bar {
  color: #e8c36a; background: rgba(155, 45, 58, 0.35);
}
.demo-phone[data-theme="dark"] .demo-phone-body h3,
.demo-phone[data-theme="wine"] .demo-phone-body h3 { color: #e8c36a; }
.demo-phone[data-theme="dark"] .demo-card,
.demo-phone[data-theme="wine"] .demo-card {
  background: linear-gradient(145deg, rgba(155, 45, 58, 0.35), rgba(20, 10, 14, 0.9));
  border-color: rgba(212, 168, 75, 0.35);
}
.demo-phone[data-theme="dark"] .demo-inline-btn,
.demo-phone[data-theme="dark"] .demo-phone-btn,
.demo-phone[data-theme="wine"] .demo-inline-btn,
.demo-phone[data-theme="wine"] .demo-phone-btn {
  background: linear-gradient(135deg, #e8c36a, #a67c2d); color: #1a0e10;
}

/* Emerald Mint */
.demo-phone[data-theme="emerald"] {
  background: linear-gradient(180deg, #143528 0%, #0c1a14 55%, #07140f 100%);
  border-color: rgba(52, 211, 153, 0.5);
}
.demo-phone[data-theme="emerald"] .demo-phone-bar {
  color: #6ee7b7; background: rgba(20, 83, 45, 0.45);
}
.demo-phone[data-theme="emerald"] .demo-phone-body h3,
.demo-phone[data-theme="emerald"] .demo-mini-chip { color: #6ee7b7; }
.demo-phone[data-theme="emerald"] .demo-card {
  background: rgba(52, 211, 153, 0.1); border-color: rgba(52, 211, 153, 0.28);
}
.demo-phone[data-theme="emerald"] .demo-inline-btn,
.demo-phone[data-theme="emerald"] .demo-phone-btn {
  background: linear-gradient(135deg, #34d399, #059669); color: #042f2e;
}

/* India Saffron */
.demo-phone[data-theme="saffron"] {
  background: linear-gradient(180deg, #3a1a0a 0%, #1a0f08 55%, #120a06 100%);
  border-color: rgba(245, 158, 11, 0.55);
}
.demo-phone[data-theme="saffron"] .demo-phone-bar {
  color: #fcd34d; background: linear-gradient(90deg, rgba(194, 65, 12, 0.5), rgba(15, 118, 110, 0.35));
}
.demo-phone[data-theme="saffron"] .demo-phone-body h3 { color: #fbbf24; }
.demo-phone[data-theme="saffron"] .demo-mini-chip {
  color: #5eead4; background: rgba(15, 118, 110, 0.25); border-color: rgba(45, 212, 191, 0.35);
}
.demo-phone[data-theme="saffron"] .demo-card {
  background: linear-gradient(145deg, rgba(194, 65, 12, 0.28), rgba(15, 118, 110, 0.15));
  border-color: rgba(245, 158, 11, 0.35);
}
.demo-phone[data-theme="saffron"] .demo-inline-btn,
.demo-phone[data-theme="saffron"] .demo-phone-btn {
  background: linear-gradient(135deg, #f59e0b, #c2410c); color: #1a0f08;
}

/* Royal Purple */
.demo-phone[data-theme="royal"] {
  background: linear-gradient(180deg, #2a1550 0%, #12081c 55%, #0a0514 100%);
  border-color: rgba(167, 139, 250, 0.5);
}
.demo-phone[data-theme="royal"] .demo-phone-bar {
  color: #ddd6fe; background: rgba(76, 29, 149, 0.45);
}
.demo-phone[data-theme="royal"] .demo-phone-body h3,
.demo-phone[data-theme="royal"] .demo-mini-chip { color: #c4b5fd; }
.demo-phone[data-theme="royal"] .demo-card {
  background: rgba(167, 139, 250, 0.12); border-color: rgba(167, 139, 250, 0.3);
}
.demo-phone[data-theme="royal"] .demo-inline-btn,
.demo-phone[data-theme="royal"] .demo-phone-btn {
  background: linear-gradient(135deg, #a78bfa, #6d28d9); color: #f5f3ff;
}

/* Teal Lagoon */
.demo-phone[data-theme="teal"] {
  background: linear-gradient(180deg, #0a3d3a 0%, #042f2e 55%, #021c1b 100%);
  border-color: rgba(45, 212, 191, 0.5);
}
.demo-phone[data-theme="teal"] .demo-phone-bar {
  color: #99f6e4; background: rgba(15, 118, 110, 0.4);
}
.demo-phone[data-theme="teal"] .demo-phone-body h3 { color: #5eead4; }
.demo-phone[data-theme="teal"] .demo-mini-chip {
  color: #fda4af; background: rgba(251, 113, 133, 0.15); border-color: rgba(251, 113, 133, 0.35);
}
.demo-phone[data-theme="teal"] .demo-card {
  background: rgba(45, 212, 191, 0.1); border-color: rgba(45, 212, 191, 0.28);
}
.demo-phone[data-theme="teal"] .demo-inline-btn,
.demo-phone[data-theme="teal"] .demo-phone-btn {
  background: linear-gradient(135deg, #2dd4bf, #fb7185); color: #042f2e;
}

.demo-controls {
  display: flex; flex-wrap: wrap; gap: .65rem; align-items: center;
  margin-top: .35rem;
}
.demo-nav-arrows { display: inline-flex; gap: .35rem; }
.demo-nav-arrows button {
  width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg-elev);
  color: var(--gold-bright); cursor: pointer; font-weight: 700;
}
.demo-nav-arrows button:disabled { opacity: .35; cursor: default; }
.demo-dots { display: inline-flex; gap: .35rem; align-items: center; }
.demo-dot {
  width: 8px; height: 8px; border-radius: 50%; border: 0;
  background: #3a3a40; cursor: pointer; padding: 0;
}
.demo-dot.on { background: var(--gold); transform: scale(1.2); }

.demo-toggle {
  display: inline-flex; flex-wrap: wrap; gap: .2rem; padding: .2rem;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: 10px;
  max-width: 100%;
}
.demo-themes-wrap { max-width: 100%; }
.demo-toggle button {
  border: 0; background: transparent; color: var(--muted);
  border-radius: 8px; padding: .4rem .65rem; cursor: pointer; font-weight: 700; font-size: .8rem;
}
.demo-toggle button.on {
  background: var(--maroon-soft); color: var(--gold-bright);
}

.demo-summary {
  margin-top: 1rem; padding: 1rem 1.1rem;
  border: 1px solid rgba(255,138,61,.35);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255,138,61,.06), rgba(20,20,22,.96));
  display: grid; gap: .75rem;
}
.demo-summary strong { color: var(--gold-bright); }
.demo-summary-actions { display: flex; flex-wrap: wrap; gap: .65rem; }

@media (max-width: 860px) {
  .demo-stage { grid-template-columns: 1fr; }
  .demo-phone { order: -1; }
}
@media (max-width: 640px) {
  .live-demo { padding: 1rem; }
  .demo-phone-body { min-height: 300px; }
}
@media (prefers-reduced-motion: reduce) {
  .demo-progress-bar { transition: none; }
  .demo-phone { transition: none; }
}
